Mercurial > hg > Database > Alice
view src/main/java/alice/topology/node/DeleteConnection.java @ 478:cf345b10a21a dispose
bug fix
author | sugi |
---|---|
date | Tue, 02 Dec 2014 17:16:34 +0900 |
parents | 041ec04d4d45 |
children | 86c45738dd9e |
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.update(info.key, list); } }