Mercurial > hg > Database > Alice
view src/main/java/alice/topology/node/ClosedEventManager.java @ 655:1c93e82e05c6 default tip
fix timestamp
author | suruga |
---|---|
date | Sat, 17 Feb 2018 00:33:00 +0900 |
parents | e321c5ec9b58 |
children |
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 ceSetKey() { ids.init(); info.setKey("_DISCONNECT"); } @SuppressWarnings("rawtypes") @Override public void run() { new ExecuteEvent(); ceSetKey(); } @SuppressWarnings("rawtypes") public synchronized <T> void register(Class<T> clazz) { ods.put("_REGISTERDEVENT", clazz); new RegisterEvent(); } }