Mercurial > hg > Database > Alice
view src/main/java/alice/topology/manager/keeparive/CreateTask.java @ 498:e5d2141af6c2 dispose
keep alive Scheduler has bug
author | sugi |
---|---|
date | Mon, 15 Dec 2014 19:16:20 +0900 |
parents | 27079619f5fd |
children | d3442b23e3df |
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(){ @SuppressWarnings("unchecked") List<String> list = info.asClass(List.class); int i = 5; for (String manager : list){ TaskInfo task = new TaskInfo(TaskType.PING); task.setInfo(manager, "_FORM_"+manager, i * 1000); ods.put("_TASKINFO", task); i +=5; } TaskInfo task = new TaskInfo(TaskType.CREATE); task.setSleepTime((i + 15) * 1000); ods.put("_TASKINFO", task); } }