view src/main/java/alice/topology/node/IncomingAbstractHostName.java @ 584:8f765e3eed24 dispose

add Topology Manager Number to Topology Node Key
author Nozomi Teruya <e125769@ie.u-ryukyu.ac.jp>
date Wed, 27 Jan 2016 18:10:50 +0900
parents aefbe41fcf12
children 3284428f525e
line wrap: on
line source

package alice.topology.node;

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

public class IncomingAbstractHostName extends CodeSegment {

    public Receiver absName = ids.create(CommandType.PEEK);
    private int topMNumber;

    public IncomingAbstractHostName(int topMNumber){
        this.topMNumber = topMNumber;
    }

    @Override
    public void run() {
        String absName = this.absName.asString();
        IncomingConnectionInfo cs = new IncomingConnectionInfo(absName, 0, topMNumber);
        cs.hostInfo.setKey("manager"+topMNumber, absName);
    }

}