comparison src/main/java/alice/topology/node/ClosedEventManager.java @ 647:e321c5ec9b58

fix toplogy manager; ring worked
author suruga
date Sun, 31 Dec 2017 19:32:27 +0900
parents 145c425db88d
children
comparison
equal deleted inserted replaced
646:3c060de44c2e 647:e321c5ec9b58
4 4
5 import alice.codesegment.CodeSegment; 5 import alice.codesegment.CodeSegment;
6 import alice.datasegment.CommandType; 6 import alice.datasegment.CommandType;
7 import alice.datasegment.Receiver; 7 import alice.datasegment.Receiver;
8 8
9 public class ClosedEventManager extends CodeSegment{ 9 public class ClosedEventManager extends CodeSegment {
10 10
11 private Receiver info = ids.create(CommandType.PEEK); 11 private Receiver info = ids.create(CommandType.PEEK);
12 private static ClosedEventManager instance = new ClosedEventManager(); 12 private static ClosedEventManager instance = new ClosedEventManager();
13 13
14 private <T> ClosedEventManager() { 14 private <T> ClosedEventManager() {
17 17
18 public static ClosedEventManager getInstance() { 18 public static ClosedEventManager getInstance() {
19 return instance; 19 return instance;
20 } 20 }
21 21
22 public void setKey() { 22 public void ceSetKey() {
23 ids.init(); 23 ids.init();
24 info.setKey("_DISCONNECT"); 24 info.setKey("_DISCONNECT");
25 } 25 }
26 26
27 @SuppressWarnings("rawtypes") 27 @SuppressWarnings("rawtypes")
28 @Override 28 @Override
29 public void run() { 29 public void run() {
30 new ExecuteEvent(); 30 new ExecuteEvent();
31 setKey(); 31 ceSetKey();
32 } 32 }
33 33
34 @SuppressWarnings("rawtypes") 34 @SuppressWarnings("rawtypes")
35 public synchronized <T> void register(Class<T> clazz) { 35 public synchronized <T> void register(Class<T> clazz) {
36 ods.put("_REGISTERDEVENT", clazz); 36 ods.put("_REGISTERDEVENT", clazz);