Mercurial > hg > Members > tatsuki > Alice
view src/alice/test/topology/share/CheckNeedLocalUpdate.java @ 134:53aff28cde6b working
change package
author | sugi |
---|---|
date | Wed, 15 Aug 2012 17:11:57 +0900 |
parents | a8f77957a477 |
children |
line wrap: on
line source
package alice.test.topology.share; import alice.codesegment.CodeSegment; import alice.datasegment.CommandType; import alice.datasegment.Receiver; import alice.test.topology.aquarium.FishPoint; public class CheckNeedLocalUpdate extends CodeSegment { private Receiver local = ids.create(CommandType.PEEK); private Receiver parent; String key; public CheckNeedLocalUpdate(String key, Receiver parent) { this.key = key; this.parent = parent; this.local.setKey("local", this.key); } @Override public void run() { System.out.println(this.local.from); if (this.parent.index > this.local.index){ System.out.println("local is updated"); ods.update("local", this.key, this.parent.asClass(FishPoint.class)); } new CheckParentIndex(this.key ,this.parent.index); } }