Mercurial > hg > Members > tatsuki > Alice
comparison src/alice/topology/manager/reconnection/CheckConnectionList.java @ 270:23e53aaa8720
reconnect manager worked.
author | sugi |
---|---|
date | Wed, 21 Aug 2013 15:33:49 +0900 |
parents | 9982e1c4f099 |
children | 3667ab045530 |
comparison
equal
deleted
inserted
replaced
269:9982e1c4f099 | 270:23e53aaa8720 |
---|---|
1 package alice.topology.manager.reconnection; | 1 package alice.topology.manager.reconnection; |
2 | 2 |
3 import java.util.ArrayList; | 3 import java.util.ArrayList; |
4 import java.util.HashMap; | 4 import java.util.HashMap; |
5 import java.util.List; | 5 import java.util.List; |
6 | |
7 import org.msgpack.type.ValueFactory; | |
6 | 8 |
7 import alice.codesegment.CodeSegment; | 9 import alice.codesegment.CodeSegment; |
8 import alice.datasegment.CommandType; | 10 import alice.datasegment.CommandType; |
9 import alice.datasegment.Receiver; | 11 import alice.datasegment.Receiver; |
10 import alice.topology.HostMessage; | 12 import alice.topology.HostMessage; |
18 | 20 |
19 public CheckConnectionList(){ | 21 public CheckConnectionList(){ |
20 name.setKey("_RECABSNAME"); | 22 name.setKey("_RECABSNAME"); |
21 connection.setKey("connection"); | 23 connection.setKey("connection"); |
22 abs.setKey("_ABSIPTABLE"); | 24 abs.setKey("_ABSIPTABLE"); |
23 clone.setKey("HMCLONE"); | 25 clone.setKey("_HMCLONE"); |
24 } | 26 } |
25 | 27 |
26 @Override | 28 @Override |
27 public void run() { | 29 public void run() { |
28 System.out.println("CheckConnectionList"); | 30 System.out.println("CheckConnectionList"); |
49 List<HostMessage> clist2 = connectionList.get(absName2); | 51 List<HostMessage> clist2 = connectionList.get(absName2); |
50 for (HostMessage mes3 : clist2){ | 52 for (HostMessage mes3 : clist2){ |
51 if (mes3.name.equals(oldInfo.name)&&mes3.port == oldInfo.port){ | 53 if (mes3.name.equals(oldInfo.name)&&mes3.port == oldInfo.port){ |
52 mes3.name = newInfo.name; | 54 mes3.name = newInfo.name; |
53 mes3.port = newInfo.port; | 55 mes3.port = newInfo.port; |
56 System.out.println(mes3.port); | |
57 System.out.println(mes3.name); | |
58 System.out.println(absName2+" "+newInfo.port); | |
59 ods.put(absName2, "_RECODATA", mes3); | |
54 break; | 60 break; |
55 } | 61 } |
56 ods.put(absName, "_RECODATA", mes3); | 62 |
63 | |
57 } | 64 } |
58 break; | 65 break; |
59 } | 66 } |
60 } | 67 } |
61 } | 68 } |
69 ods.put(absName, ValueFactory.createNilValue()); | |
70 | |
62 | 71 |
63 ods.update("connection", connectionList); | 72 ods.update("connection", connectionList); |
64 new ReceiveError(); | 73 new ReceiveError(); |
65 } | 74 } |
66 } | 75 } |