Mercurial > hg > Database > Alice
comparison src/main/java/alice/topology/node/ConfigurationFinish.java @ 345:8f71c3e6f11d
Change directory structure Maven standard
author | sugi |
---|---|
date | Wed, 16 Apr 2014 18:26:07 +0900 |
parents | |
children | 3a0056e03040 |
comparison
equal
deleted
inserted
replaced
344:9f97ec18f8c5 | 345:8f71c3e6f11d |
---|---|
1 package alice.topology.node; | |
2 | |
3 import org.msgpack.type.ValueFactory; | |
4 | |
5 import alice.codesegment.CodeSegment; | |
6 import alice.datasegment.CommandType; | |
7 import alice.datasegment.Receiver; | |
8 import alice.topology.manager.reconnection.ReceiveReconnectData; | |
9 | |
10 public class ConfigurationFinish extends CodeSegment { | |
11 | |
12 public Receiver reverseCount = ids.create(CommandType.PEEK); | |
13 public Receiver configNodeNum = ids.create(CommandType.PEEK); | |
14 private CodeSegment startCS; | |
15 | |
16 public ConfigurationFinish(CodeSegment startCS) { | |
17 this.startCS = startCS; | |
18 } | |
19 | |
20 @Override | |
21 public void run() { | |
22 if (reverseCount.getVal().equals(configNodeNum.getVal())) { | |
23 new ReceiveReconnectData(); | |
24 | |
25 ods.put("manager", "done", ValueFactory.createNilValue()); | |
26 Start cs = new Start(startCS); | |
27 cs.done.setKey("manager", "start"); | |
28 return; | |
29 } | |
30 | |
31 ConfigurationFinish cs3 = new ConfigurationFinish(startCS); | |
32 cs3.reverseCount.setKey("local", "reverseCount", this.reverseCount.index); | |
33 cs3.configNodeNum.setKey("local", "configNodeNum"); | |
34 } | |
35 | |
36 } |