public interface ChannelPool
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Destroy all channels that has been cached by this instance.
|
void |
flushPartitions(java.util.function.Predicate<java.lang.Object> predicate)
Flush partitions based on a predicate
|
java.util.Map<java.lang.String,java.lang.Long> |
getIdleChannelCountPerHost() |
boolean |
isOpen()
Return true if a channel can be cached.
|
boolean |
offer(io.netty.channel.Channel channel,
java.lang.Object partitionKey)
Add a channel to the pool
|
io.netty.channel.Channel |
poll(java.lang.Object partitionKey)
Remove the channel associated with the uri.
|
boolean |
removeAll(io.netty.channel.Channel channel)
Remove all channels from the cache.
|
boolean offer(io.netty.channel.Channel channel, java.lang.Object partitionKey)
channel
- an I/O channelpartitionKey
- a key used to retrieve the cached channelio.netty.channel.Channel poll(java.lang.Object partitionKey)
partitionKey
- the partition used when invoking offerboolean removeAll(io.netty.channel.Channel channel)
channel
- a channelboolean isOpen()
offer(Channel, Object)
void destroy()
void flushPartitions(java.util.function.Predicate<java.lang.Object> predicate)
predicate
- the predicatejava.util.Map<java.lang.String,java.lang.Long> getIdleChannelCountPerHost()
Copyright © 2018. All Rights Reserved.