|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.perforce.p4java.impl.mapbased.rpc.stream.RpcSocketPool
public class RpcSocketPool
| Nested Class Summary | |
|---|---|
static interface |
RpcSocketPool.ShutdownHandler
Shutdown handler for cleaning up before a socket is closed |
| Constructor Summary | |
|---|---|
RpcSocketPool(int poolSize,
String host,
int port,
Properties socketProperties,
RpcSocketPool.ShutdownHandler shutdownHandler)
Create a new socket pool with a max pool size, host, port, and socket properties, and an optional shutdown handler |
|
| Method Summary | |
|---|---|
Socket |
acquire()
Acquire a socket to the configured server address |
static void |
configureSocket(Socket socket,
Properties properties)
Configure socket with specified properties |
void |
disconnect()
Disconnect all sockets from the specified host and port |
void |
release(Socket socket,
RpcSocketPool.ShutdownHandler shutdownHandler)
Release a socket back to the pool as no longer using |
void |
timeout(int idleDuration)
Timeout any sockets idle for greater than or equal to the milliseconds value specified |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RpcSocketPool(int poolSize,
String host,
int port,
Properties socketProperties,
RpcSocketPool.ShutdownHandler shutdownHandler)
poolSize - host - port - socketProperties - shutdownHandler - | Method Detail |
|---|
public static void configureSocket(Socket socket,
Properties properties)
socket - properties -
public Socket acquire()
throws IOException
IOException
public void release(Socket socket,
RpcSocketPool.ShutdownHandler shutdownHandler)
throws IOException
socket - shutdownHandler -
IOExceptionpublic void disconnect()
public void timeout(int idleDuration)
idleDuration -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||