public class NoopChannelPool extends Object implements ChannelPool
Constructor and Description |
---|
NoopChannelPool() |
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Destroy all channels that has been cached by this instance.
|
void |
flushPartition(Object partitionKey)
Flush a partition
|
void |
flushPartitions(ChannelPoolPartitionSelector selector)
Flush partitions based on a selector
|
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.
|
public boolean offer(io.netty.channel.Channel channel, Object partitionKey)
ChannelPool
offer
in interface ChannelPool
channel
- an I/O channelpartitionKey
- a key used to retrieve the cached channelpublic io.netty.channel.Channel poll(Object partitionKey)
ChannelPool
poll
in interface ChannelPool
partitionKey
- the partition used when invoking offerpublic boolean removeAll(io.netty.channel.Channel channel)
ChannelPool
removeAll
in interface ChannelPool
channel
- a channelpublic boolean isOpen()
ChannelPool
ChannelPool#offer(Object, Object)
isOpen
in interface ChannelPool
public void destroy()
ChannelPool
destroy
in interface ChannelPool
public void flushPartition(Object partitionKey)
ChannelPool
flushPartition
in interface ChannelPool
public void flushPartitions(ChannelPoolPartitionSelector selector)
ChannelPool
flushPartitions
in interface ChannelPool
Copyright © 2015. All Rights Reserved.