Mercurial > hg > RemoteEditor > REPSessionManager
changeset 306:ef00df38dd5d
*** empty log message ***
author | kono |
---|---|
date | Sat, 04 Oct 2008 18:16:45 +0900 |
parents | ffd8bb47b188 |
children | e4b7af3fdf99 |
files | rep/channel/REPSocketChannel.java |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/rep/channel/REPSocketChannel.java Wed Oct 01 21:07:05 2008 +0900 +++ b/rep/channel/REPSocketChannel.java Sat Oct 04 18:16:45 2008 +0900 @@ -11,13 +11,16 @@ import java.nio.channels.SocketChannel; import java.nio.channels.spi.AbstractSelector; import java.nio.channels.spi.SelectorProvider; +import java.util.Collections; import java.util.HashMap; +import java.util.Map; public class REPSocketChannel<P> extends SelectableChannel{ public SocketChannel sc; private REPPack<P> pack; - static public HashMap<SelectableChannel,SelectableChannel> channels = new HashMap<SelectableChannel,SelectableChannel>(); + static public Map<SelectableChannel,SelectableChannel> channels = + Collections.synchronizedMap(new HashMap<SelectableChannel,SelectableChannel>()); public REPSocketChannel(SocketChannel channel, REPPack<P> packer) { sc = channel;