view src/alice/test/topology/aquarium/AddRoutingTable.java @ 137:ed78890ed8e9 working

Share Test
author sugi
date Sun, 26 Aug 2012 18:33:13 +0900
parents 53aff28cde6b
children 1b532146b355
line wrap: on
line source

package alice.test.topology.aquarium;

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

public class AddRoutingTable extends CodeSegment {
	
	public Receiver mail = ids.create(CommandType.PEEK);
	RoutingTable routing;
	
	public AddRoutingTable(RoutingTable routing,int index){
		this.routing = routing;
		this.mail.setKey("local", "member",index);
		
	}

	@Override
	public void run() {
		//System.out.println("add "+this.mail.from);
		routing.table.add(new Routing(this.mail.from));
		
		ods.update("local", "list", this.routing);
		new AddRoutingTable(this.routing,this.mail.index);
		
	}
	
}