comparison src/main/java/alice/test/topology/aquarium/CheckLocalIndex.java @ 345:8f71c3e6f11d

Change directory structure Maven standard
author sugi
date Wed, 16 Apr 2014 18:26:07 +0900
parents
children
comparison
equal deleted inserted replaced
344:9f97ec18f8c5 345:8f71c3e6f11d
1 package alice.test.topology.aquarium;
2
3 import java.util.List;
4
5 import alice.codesegment.CodeSegment;
6 import alice.datasegment.CommandType;
7 import alice.datasegment.Receiver;
8
9 public class CheckLocalIndex extends CodeSegment {
10
11 private Receiver data = ids.create(CommandType.PEEK);
12 private Receiver list = ids.create(CommandType.PEEK);
13
14 public CheckLocalIndex(String key, int index){
15 this.list.setKey("_CLIST");
16 this.data.setKey(key, index);
17 }
18
19 @Override
20 public void run() {
21 @SuppressWarnings("unchecked")
22 List<String> r = list.asClass(List.class);
23 for (String node : r) {
24 if (!node.equals(data.from)) {
25 System.out.println(data.from);
26 ods.update(node, data.key, data.getVal());
27 }
28 }
29 new CheckLocalIndex(data.key, data.index);
30
31 }
32
33 }