Mercurial > hg > Database > Alice
view 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 |
line wrap: on
line source
package alice.topology.node; import java.util.ArrayList; import alice.codesegment.CodeSegment; import alice.datasegment.CommandType; import alice.datasegment.Receiver; public class ClosedEventManager extends CodeSegment{ private Receiver info = ids.create(CommandType.PEEK); private static ClosedEventManager instance = new ClosedEventManager(); private <T> ClosedEventManager() { ods.put("_DEVENTLIST", new ArrayList<Class<T>>()); } public static ClosedEventManager getInstance() { return instance; } public void setKey() { ids.init(); info.setKey("_DISCONNECT"); } @SuppressWarnings("rawtypes") @Override public void run() { new ExecuteEvent(); setKey(); } @SuppressWarnings("rawtypes") public synchronized <T> void register(Class<T> clazz) { ods.put("_REGISTERDEVENT", clazz); new RegisterEvent(); } }