public interface ChannelPool
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Destroy all channels that has been cached by this instance.
|
void |
flushPartitions(Predicate<Object> predicate)
Flush partitions based on a predicate
|
Map<String,Long> |
getIdleChannelCountPerHost() |
boolean |
isOpen()
Return true if a channel can be cached.
|
boolean |
offer(io.netty.channel.Channel channel,
Object partitionKey)
Add a channel to the pool
|
io.netty.channel.Channel |
poll(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, Object partitionKey)
channel
- an I/O channelpartitionKey
- a key used to retrieve the cached channelio.netty.channel.Channel poll(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(Predicate<Object> predicate)
predicate
- the predicateCopyright © 2019. All rights reserved.