Mercurial > hg > Database > Alice
view src/main/java/alice/test/topology/aquarium/CheckLocalIndex.java @ 547:e91a574b69de dispose
remove index
author | Nozomi Teruya <e125769@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 18 Aug 2015 16:15:17 +0900 |
parents | 15eeb439830c |
children |
line wrap: on
line source
package alice.test.topology.aquarium; import java.util.List; import alice.codesegment.CodeSegment; import alice.datasegment.CommandType; import alice.datasegment.Receiver; public class CheckLocalIndex extends CodeSegment { private Receiver data = ids.create(CommandType.PEEK); private Receiver list = ids.create(CommandType.PEEK); public CheckLocalIndex(String key){ this.list.setKey("_CLIST", this); this.data.setKey(key, this); } @Override public void run() { @SuppressWarnings("unchecked") List<String> r = list.asClass(List.class); for (String node : r) { if (!node.equals(data.from)) { System.out.println(data.from); ods.update(node, data.key, data.getVal()); } } new CheckLocalIndex(data.key); } }