|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectvoldemort.store.socket.clientrequest.ClientRequestExecutorPool
public class ClientRequestExecutorPool
A pool of ClientRequestExecutor
keyed off the
SocketDestination
. This is a wrapper around
QueuedKeyedResourcePool
that translates exceptions, provides some JMX
access, and handles asynchronous requests for SocketDestinations.
close()
.
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_IDENTIFIER_STRING
|
static java.lang.Boolean |
DEFAULT_JMX_ENABLED
|
static java.lang.Integer |
DEFAULT_SELECTORS
|
static java.lang.Boolean |
DEFAULT_SOCKET_KEEP_ALIVE
|
Constructor Summary | |
---|---|
ClientRequestExecutorPool(int maxConnectionsPerNode,
int connectionTimeoutMs,
int soTimeoutMs,
int socketBufferSize)
|
|
ClientRequestExecutorPool(int selectors,
int maxConnectionsPerNode,
int connectionTimeoutMs,
int soTimeoutMs,
int socketBufferSize,
boolean socketKeepAlive)
|
|
ClientRequestExecutorPool(int selectors,
int maxConnectionsPerNode,
int connectionTimeoutMs,
int soTimeoutMs,
int socketBufferSize,
boolean socketKeepAlive,
boolean jmxEnabled,
java.lang.String identifierString)
|
Method Summary | ||
---|---|---|
void |
checkin(SocketDestination destination,
ClientRequestExecutor clientRequestExecutor)
Check the socket back into the pool. |
|
ClientRequestExecutor |
checkout(SocketDestination destination)
Checkout a socket from the pool |
|
void |
close()
Permanently close the ClientRequestExecutor pool. |
|
void |
close(SocketDestination destination)
Reset the pool of resources for a specific destination. |
|
SocketStore |
create(java.lang.String storeName,
java.lang.String hostName,
int port,
RequestFormatType requestFormatType,
RequestRoutingType requestRoutingType)
Create a new socket store to talk to a given server for a specific store Note: IGNORE_CHECKS will only be honored for Protobuf request format |
|
ClientRequestExecutorFactory |
getFactory()
|
|
ClientSocketStats |
getStats()
|
|
|
submitAsync(SocketDestination destination,
ClientRequest<T> delegate,
NonblockingStoreCallback callback,
long timeoutMs,
java.lang.String operationName)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.Integer DEFAULT_SELECTORS
public static final java.lang.Boolean DEFAULT_SOCKET_KEEP_ALIVE
public static final java.lang.Boolean DEFAULT_JMX_ENABLED
public static final java.lang.String DEFAULT_IDENTIFIER_STRING
Constructor Detail |
---|
public ClientRequestExecutorPool(int selectors, int maxConnectionsPerNode, int connectionTimeoutMs, int soTimeoutMs, int socketBufferSize, boolean socketKeepAlive, boolean jmxEnabled, java.lang.String identifierString)
public ClientRequestExecutorPool(int selectors, int maxConnectionsPerNode, int connectionTimeoutMs, int soTimeoutMs, int socketBufferSize, boolean socketKeepAlive)
public ClientRequestExecutorPool(int maxConnectionsPerNode, int connectionTimeoutMs, int soTimeoutMs, int socketBufferSize)
Method Detail |
---|
public ClientRequestExecutorFactory getFactory()
public SocketStore create(java.lang.String storeName, java.lang.String hostName, int port, RequestFormatType requestFormatType, RequestRoutingType requestRoutingType)
create
in interface SocketStoreFactory
storeName
- hostName
- port
- requestFormatType
- protocol to userequestRoutingType
- routed/ignore checks/normal
SocketStore
public ClientRequestExecutor checkout(SocketDestination destination)
destination
- The socket destination you want to connect to
public void checkin(SocketDestination destination, ClientRequestExecutor clientRequestExecutor)
destination
- The socket destination of the socketclientRequestExecutor
- The request executor wrapperpublic void close(SocketDestination destination)
close
in interface SocketStoreFactory
destination
- SocketDestination
representing the host name,
port, etc. for a remote hostpublic void close()
close
in interface SocketStoreFactory
public ClientSocketStats getStats()
public <T> void submitAsync(SocketDestination destination, ClientRequest<T> delegate, NonblockingStoreCallback callback, long timeoutMs, java.lang.String operationName)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |