Mercurial > hg > Database > Alice
view src/main/java/alice/topology/manager/keeparive/CreateTask.java @ 345:8f71c3e6f11d
Change directory structure Maven standard
author | sugi |
---|---|
date | Wed, 16 Apr 2014 18:26:07 +0900 |
parents | |
children | aefbe41fcf12 |
line wrap: on
line source
package alice.topology.manager.keeparive; import java.util.List; import alice.codesegment.CodeSegment; import alice.datasegment.CommandType; import alice.datasegment.Receiver; public class CreateTask extends CodeSegment{ private Receiver info = ids.create(CommandType.PEEK); public CreateTask(){ info.setKey("_CLIST"); } @Override public void run(){ ods.put("_WAITINGLIST", new ListManager()); @SuppressWarnings("unchecked") List<String> list = info.asClass(List.class); new CheckExistTask(); TaskExecuter.getInstance().setKey(); for (String manager : list){ int i = 5; TaskInfo task = new TaskInfo(TaskType.PING); task.setInfo(manager, "_FORM_"+manager, i * 1000); ods.put("_TASKINFO", task); i +=5; } } }