|
24 | 24 | import io.netty.util.Timeout;
|
25 | 25 | import io.netty.util.Timer;
|
26 | 26 | import io.netty.util.TimerTask;
|
| 27 | +import io.netty.util.internal.chmv8.ConcurrentHashMapV8; |
27 | 28 |
|
28 | 29 | import java.util.ArrayList;
|
29 | 30 | import java.util.List;
|
30 | 31 | import java.util.Set;
|
31 |
| -import java.util.concurrent.ConcurrentHashMap; |
32 | 32 | import java.util.concurrent.ConcurrentLinkedQueue;
|
33 | 33 | import java.util.concurrent.TimeUnit;
|
34 | 34 | import java.util.concurrent.atomic.AtomicBoolean;
|
|
39 | 39 | public class DefaultChannelPool implements ChannelPool {
|
40 | 40 |
|
41 | 41 | private final static Logger log = LoggerFactory.getLogger(DefaultChannelPool.class);
|
42 |
| - private final ConcurrentHashMap<String, ConcurrentLinkedQueue<IdleChannel>> connectionsPool = new ConcurrentHashMap<String, ConcurrentLinkedQueue<IdleChannel>>(); |
43 |
| - private final ConcurrentHashMap<Channel, IdleChannel> channel2IdleChannel = new ConcurrentHashMap<Channel, IdleChannel>(); |
44 |
| - private final ConcurrentHashMap<Channel, Long> channel2CreationDate = new ConcurrentHashMap<Channel, Long>(); |
| 42 | + private final ConcurrentHashMapV8<String, ConcurrentLinkedQueue<IdleChannel>> connectionsPool = new ConcurrentHashMapV8<String, ConcurrentLinkedQueue<IdleChannel>>(); |
| 43 | + private final ConcurrentHashMapV8<Channel, IdleChannel> channel2IdleChannel = new ConcurrentHashMapV8<Channel, IdleChannel>(); |
| 44 | + private final ConcurrentHashMapV8<Channel, Long> channel2CreationDate = new ConcurrentHashMapV8<Channel, Long>(); |
45 | 45 | private final AtomicBoolean closed = new AtomicBoolean(false);
|
46 | 46 | private final Timer nettyTimer;
|
47 | 47 | private final boolean sslConnectionPoolEnabled;
|
|
0 commit comments