view src/main/java/alice/topology/node/Start.java @ 419:aefbe41fcf12 dispose

change tab to space
author sugi
date Tue, 15 Jul 2014 16:00:22 +0900
parents fee3efd9257d
children 3fff2edc8d33
line wrap: on
line source

package alice.topology.node;

import org.apache.log4j.Logger;

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

public class Start extends CodeSegment {

    public Receiver done = ids.create(CommandType.PEEK);
    public Receiver runningFlag = ids.create(CommandType.TAKE);

    private Logger logger = Logger.getLogger(Start.class);
    private CodeSegment startCS;


    public Start(CodeSegment startCS) {
        this.startCS = startCS;
    }

    @Override
    public void run() {
        logger.info("Configuration finished.");

        if (startCS == null)
            return;
        ods.update(runningFlag.key, true);
        startCS.execute();

    }

}