Mercurial > hg > Database > Alice
view src/main/java/alice/topology/node/DeleteConnection.java @ 473:041ec04d4d45 dispose
refactor
author | sugi |
---|---|
date | Sun, 30 Nov 2014 00:00:48 +0900 |
parents | be0b61986ff7 |
children | cf345b10a21a |
line wrap: on
line source
package alice.topology.node; import java.util.List; import alice.codesegment.CloseEventCodeSegment; import alice.datasegment.CommandType; import alice.datasegment.DataSegment; import alice.datasegment.Receiver; public class DeleteConnection extends CloseEventCodeSegment { private Receiver info = ids.create(CommandType.TAKE); public DeleteConnection() { info.setKey("_CLIST"); } @Override public void run() { String name = getConnectionInfo().nodeName; @SuppressWarnings("unchecked") List<String> list = info.asClass(List.class); if (list.contains(name)) list.remove(name); if (DataSegment.contains(name)) DataSegment.get(name).shutdown(); ods.put(info.key, list); } }