public class NoopChannelPool extends Object implements ChannelPool
Constructor and Description |
---|
NoopChannelPool() |
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Destroy all connections that has been cached by this instance.
|
void |
flushPartition(String partitionId)
Flush a partition
|
void |
flushPartitions(ChannelPoolPartitionSelector selector)
Flush partitions based on a selector
|
boolean |
isOpen()
Return true if a connection can be cached.
|
boolean |
offer(org.jboss.netty.channel.Channel connection,
String poolKey)
Add a connection to the pool
|
org.jboss.netty.channel.Channel |
poll(String uri)
Get a connection from a partition
|
boolean |
removeAll(org.jboss.netty.channel.Channel connection)
Remove all connections from the cache.
|
public boolean offer(org.jboss.netty.channel.Channel connection, String poolKey)
ChannelPool
offer
in interface ChannelPool
connection
- an I/O connectionpoolKey
- a key used to retrieve the cached connectionpublic org.jboss.netty.channel.Channel poll(String uri)
ChannelPool
poll
in interface ChannelPool
uri
- the id of the partition used when invoking offerpublic boolean removeAll(org.jboss.netty.channel.Channel connection)
ChannelPool
removeAll
in interface ChannelPool
connection
- a connectionpublic boolean isOpen()
ChannelPool
ChannelPool#offer(Object, Object)
isOpen
in interface ChannelPool
public void destroy()
ChannelPool
destroy
in interface ChannelPool
public void flushPartition(String partitionId)
ChannelPool
flushPartition
in interface ChannelPool
public void flushPartitions(ChannelPoolPartitionSelector selector)
ChannelPool
flushPartitions
in interface ChannelPool
Copyright © 2014. All Rights Reserved.