Replaced ConcurrentHashMap with ConcurrentIdentityHashMap wherever possible
This commit is contained in:
parent
b2d27d3b69
commit
a176ae4f3c
@ -40,7 +40,7 @@ import org.jboss.netty.channel.ChannelState;
|
||||
import org.jboss.netty.channel.ChannelStateEvent;
|
||||
import org.jboss.netty.logging.InternalLogger;
|
||||
import org.jboss.netty.logging.InternalLoggerFactory;
|
||||
import org.jboss.netty.util.ConcurrentHashMap;
|
||||
import org.jboss.netty.util.ConcurrentIdentityHashMap;
|
||||
import org.jboss.netty.util.LinkedTransferQueue;
|
||||
|
||||
/**
|
||||
@ -90,7 +90,7 @@ public class MemoryAwareThreadPoolExecutor extends ThreadPoolExecutor {
|
||||
private volatile Settings settings;
|
||||
|
||||
private final ConcurrentMap<Channel, AtomicLong> channelCounters =
|
||||
new ConcurrentHashMap<Channel, AtomicLong>();
|
||||
new ConcurrentIdentityHashMap<Channel, AtomicLong>();
|
||||
private final AtomicLong totalCounter = new AtomicLong();
|
||||
|
||||
private final Semaphore semaphore = new Semaphore(0);
|
||||
|
@ -32,7 +32,7 @@ import org.jboss.netty.channel.Channel;
|
||||
import org.jboss.netty.channel.ChannelEvent;
|
||||
import org.jboss.netty.channel.ChannelState;
|
||||
import org.jboss.netty.channel.ChannelStateEvent;
|
||||
import org.jboss.netty.util.ConcurrentHashMap;
|
||||
import org.jboss.netty.util.ConcurrentIdentityHashMap;
|
||||
|
||||
/**
|
||||
* A {@link MemoryAwareThreadPoolExecutor} which maintains the
|
||||
@ -66,7 +66,7 @@ public class OrderedMemoryAwareThreadPoolExecutor extends
|
||||
MemoryAwareThreadPoolExecutor {
|
||||
|
||||
private final ConcurrentMap<Channel, Executor> childExecutors =
|
||||
new ConcurrentHashMap<Channel, Executor>();
|
||||
new ConcurrentIdentityHashMap<Channel, Executor>();
|
||||
|
||||
/**
|
||||
* Creates a new instance.
|
||||
|
Loading…
Reference in New Issue
Block a user