public enum NoopChannelPool extends Enum<NoopChannelPool> implements ChannelPool
Enum Constant and Description |
---|
INSTANCE |
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(Channel channel,
Object partitionKey)
Add a channel to the pool
|
Channel |
poll(Object partitionKey)
Remove the channel associated with the uri.
|
boolean |
removeAll(Channel channel)
Remove all channels from the cache.
|
static NoopChannelPool |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static NoopChannelPool[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final NoopChannelPool INSTANCE
public static NoopChannelPool[] values()
for (NoopChannelPool c : NoopChannelPool.values()) System.out.println(c);
public static NoopChannelPool valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic boolean offer(Channel channel, Object partitionKey)
ChannelPool
offer
in interface ChannelPool
channel
- an I/O channelpartitionKey
- a key used to retrieve the cached channelpublic Channel poll(Object partitionKey)
ChannelPool
poll
in interface ChannelPool
partitionKey
- the partition used when invoking offerpublic boolean removeAll(Channel channel)
ChannelPool
removeAll
in interface ChannelPool
channel
- a channelpublic boolean isOpen()
ChannelPool
ChannelPool.offer(Channel, Object)
isOpen
in interface ChannelPool
public void destroy()
ChannelPool
destroy
in interface ChannelPool
public void flushPartition(Object partitionKey)
ChannelPool
flushPartition
in interface ChannelPool
partitionKey
- the partitionpublic void flushPartitions(ChannelPoolPartitionSelector selector)
ChannelPool
flushPartitions
in interface ChannelPool
selector
- the selectorCopyright © 2017. All Rights Reserved.