Mercurial > hg > Database > Alice
view src/alice/test/topology/aquarium/Update.java @ 138:87f1a30a8c82 working
change range automatic
author | sugi |
---|---|
date | Tue, 18 Sep 2012 11:46:38 +0900 (2012-09-18) |
parents | 53aff28cde6b |
children |
line wrap: on
line source
package alice.test.topology.aquarium; import alice.codesegment.CodeSegment; import alice.datasegment.CommandType; import alice.datasegment.Receiver; public class Update extends CodeSegment { private Receiver list = ids.create(CommandType.PEEK); private Receiver data; private String key; public Update(String key,Receiver data){ this.key = key; this.data = data; this.list.setKey("local", "list"); } @Override public void run() { RoutingTable rt = this.list.asClass(RoutingTable.class); for (Routing r : rt.table) { if (!r.name.equals(this.data.from)){ ods.update(r.name, this.key, this.data.val); } } new CheckLocalIndex(this.key,this.data.index); } }