Mercurial > hg > Database > Alice
annotate 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 |
rev | line source |
---|---|
469 | 1 package alice.topology.node; |
2 | |
3 import java.util.ArrayList; | |
4 | |
5 import alice.codesegment.CodeSegment; | |
6 import alice.datasegment.CommandType; | |
7 import alice.datasegment.Receiver; | |
8 | |
647 | 9 public class ClosedEventManager extends CodeSegment { |
469 | 10 |
11 private Receiver info = ids.create(CommandType.PEEK); | |
506 | 12 private static ClosedEventManager instance = new ClosedEventManager(); |
469 | 13 |
506 | 14 private <T> ClosedEventManager() { |
469 | 15 ods.put("_DEVENTLIST", new ArrayList<Class<T>>()); |
16 } | |
17 | |
506 | 18 public static ClosedEventManager getInstance() { |
469 | 19 return instance; |
20 } | |
21 | |
647 | 22 public void ceSetKey() { |
469 | 23 ids.init(); |
470 | 24 info.setKey("_DISCONNECT"); |
469 | 25 } |
26 | |
523
145c425db88d
add CompressedLDSM
Nozomi Teruya <e125769@ie.u-ryukyu.ac.jp>
parents:
518
diff
changeset
|
27 @SuppressWarnings("rawtypes") |
469 | 28 @Override |
29 public void run() { | |
30 new ExecuteEvent(); | |
647 | 31 ceSetKey(); |
469 | 32 } |
33 | |
523
145c425db88d
add CompressedLDSM
Nozomi Teruya <e125769@ie.u-ryukyu.ac.jp>
parents:
518
diff
changeset
|
34 @SuppressWarnings("rawtypes") |
469 | 35 public synchronized <T> void register(Class<T> clazz) { |
36 ods.put("_REGISTERDEVENT", clazz); | |
37 new RegisterEvent(); | |
38 } | |
39 } |