Mercurial > hg > Database > Alice
annotate src/main/java/alice/topology/node/ClosedEventManager.java @ 523:145c425db88d dispose
add CompressedLDSM
author | Nozomi Teruya <e125769@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 09 Apr 2015 18:36:26 +0900 |
parents | fc313323c53b |
children | 15eeb439830c 767d93626b88 3284428f525e e321c5ec9b58 |
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 | |
506 | 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 | |
22 public void setKey() { | |
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(); | |
31 setKey(); | |
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 } |