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)
ChannelPooloffer in interface ChannelPoolchannel - an I/O channelpartitionKey - a key used to retrieve the cached channelpublic Channel poll(Object partitionKey)
ChannelPoolpoll in interface ChannelPoolpartitionKey - the partition used when invoking offerpublic boolean removeAll(Channel channel)
ChannelPoolremoveAll in interface ChannelPoolchannel - a channelpublic boolean isOpen()
ChannelPoolChannelPool.offer(Channel, Object)isOpen in interface ChannelPoolpublic void destroy()
ChannelPooldestroy in interface ChannelPoolpublic void flushPartition(Object partitionKey)
ChannelPoolflushPartition in interface ChannelPoolpartitionKey - the partitionpublic void flushPartitions(ChannelPoolPartitionSelector selector)
ChannelPoolflushPartitions in interface ChannelPoolselector - the selectorCopyright © 2016. All Rights Reserved.