Mercurial > hg > Database > Alice
changeset 506:9e69b5c6fe44 dispose
rename
author | sugi |
---|---|
date | Fri, 02 Jan 2015 15:43:52 +0900 |
parents | 63b18091374c |
children | 28627bb3eeda |
files | src/main/java/alice/topology/node/ClosedEventManager.java src/main/java/alice/topology/node/ConfigurationFinish.java src/main/java/alice/topology/node/DisconnectEventManager.java |
diffstat | 3 files changed, 41 insertions(+), 41 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/alice/topology/node/ClosedEventManager.java Fri Jan 02 15:43:52 2015 +0900 @@ -0,0 +1,39 @@ +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(); + } +}
--- a/src/main/java/alice/topology/node/ConfigurationFinish.java Fri Jan 02 15:43:41 2015 +0900 +++ b/src/main/java/alice/topology/node/ConfigurationFinish.java Fri Jan 02 15:43:52 2015 +0900 @@ -28,8 +28,8 @@ new StartKeepAlive().execute(); new ReceiveCloseMessage(CommandType.PEEK); - DisconnectEventManager.getInstance().register(DeleteConnection.class); - DisconnectEventManager.getInstance().setKey(); + ClosedEventManager.getInstance().register(DeleteConnection.class); + ClosedEventManager.getInstance().setKey(); return; }
--- a/src/main/java/alice/topology/node/DisconnectEventManager.java Fri Jan 02 15:43:41 2015 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -package alice.topology.node; - -import java.util.ArrayList; - -import alice.codesegment.CodeSegment; -import alice.datasegment.CommandType; -import alice.datasegment.Receiver; - -public class DisconnectEventManager extends CodeSegment{ - - private Receiver info = ids.create(CommandType.PEEK); - private static DisconnectEventManager instance = new DisconnectEventManager(); - - private <T> DisconnectEventManager() { - ods.put("_DEVENTLIST", new ArrayList<Class<T>>()); - } - - public static DisconnectEventManager 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(); - } -}