view src/main/java/alice/topology/manager/keeparive/CreateSchedule.java @ 419:aefbe41fcf12 dispose

change tab to space
author sugi
date Tue, 15 Jul 2014 16:00:22 +0900
parents 8f71c3e6f11d
children 6e304a7a60e7
line wrap: on
line source

package alice.topology.manager.keeparive;

import alice.codesegment.CodeSegment;
import alice.datasegment.CommandType;
import alice.datasegment.Receiver;

public class CreateSchedule extends CodeSegment{
    private Receiver info1 = ids.create(CommandType.TAKE); // WaitingList 
    private Receiver info2 = ids.create(CommandType.TAKE); // TaskInfo

    public CreateSchedule(){
        info1.setKey("_WAITINGLIST");
        info2.setKey("_TASKINFO");
    }

    @Override
    public void run() {
        ListManager manager = info1.asClass(ListManager.class);
        TaskInfo newTask = info2.asClass(TaskInfo.class);
        manager.addTask(newTask);
        ods.update("_WAITINGLIST", manager);
        new CheckExistTask();
    }
}