|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectvoldemort.client.protocol.admin.SocketPool
public class SocketPool
A pool of sockets keyed off the socket destination. This wrapper just translates exceptions and delegates to apache commons pool as well as providing some JMX access.
Constructor Summary | |
---|---|
SocketPool(int maxConnectionsPerNode,
int connectionTimeoutMs,
int soTimeoutMs,
int socketBufferSize)
|
|
SocketPool(int maxConnectionsPerNode,
int connectionTimeoutMs,
int soTimeoutMs,
int socketBufferSize,
boolean socketKeepAlive)
|
Method Summary | |
---|---|
void |
checkin(SocketDestination destination,
SocketAndStreams socket)
Check the socket back into the pool. |
SocketAndStreams |
checkout(SocketDestination destination)
Checkout a socket from the pool |
void |
close()
Close the socket pool |
void |
close(SocketDestination destination)
|
double |
getAvgWaitTimeMs()
|
int |
getNumberOfActiveConnections()
|
int |
getNumberOfCheckedInConnections()
|
int |
getNumberSocketsCreated()
|
int |
getNumberSocketsDestroyed()
|
void |
setMonitoringInterval(int count)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SocketPool(int maxConnectionsPerNode, int connectionTimeoutMs, int soTimeoutMs, int socketBufferSize, boolean socketKeepAlive)
public SocketPool(int maxConnectionsPerNode, int connectionTimeoutMs, int soTimeoutMs, int socketBufferSize)
Method Detail |
---|
public SocketAndStreams checkout(SocketDestination destination)
destination
- The socket destination you want to connect to
public void checkin(SocketDestination destination, SocketAndStreams socket)
destination
- The socket destination of the socketsocket
- The socket to check back inpublic void close(SocketDestination destination)
public void close()
public int getNumberSocketsCreated()
public int getNumberSocketsDestroyed()
public int getNumberOfActiveConnections()
public int getNumberOfCheckedInConnections()
public double getAvgWaitTimeMs()
public void setMonitoringInterval(int count)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |