Class ORemoteConnectionPool
java.lang.Object
com.orientechnologies.orient.client.remote.ORemoteConnectionPool
- All Implemented Interfaces:
OResourcePoolListener<String,OChannelBinaryAsynchClient>
public class ORemoteConnectionPool
extends Object
implements OResourcePoolListener<String,OChannelBinaryAsynchClient>
Created by tglman on 01/10/15.
-
Constructor Summary
ConstructorsConstructorDescriptionORemoteConnectionPool(int iMaxResources, String host, int port, OContextConfiguration conf) -
Method Summary
Modifier and TypeMethodDescriptionacquire(String iServerURL, long timeout, OContextConfiguration clientConfiguration) voidcheckIdle(long timeout) protected OChannelBinaryAsynchClientcreateNewResource(String iKey) Creates a new resource to be used and to be pooled when the client finishes with it.getPool()booleanreuseResource(String iKey, OChannelBinaryAsynchClient iValue) Reuses the pooled resource.
-
Constructor Details
-
ORemoteConnectionPool
-
-
Method Details
-
createNetworkConnection
- Throws:
OIOException
-
createNewResource
Description copied from interface:OResourcePoolListenerCreates a new resource to be used and to be pooled when the client finishes with it.- Specified by:
createNewResourcein interfaceOResourcePoolListener<String,OChannelBinaryAsynchClient> - Returns:
- The new resource
-
reuseResource
Description copied from interface:OResourcePoolListenerReuses the pooled resource.- Specified by:
reuseResourcein interfaceOResourcePoolListener<String,OChannelBinaryAsynchClient> - Returns:
- true if can be reused, otherwise false. In this case the resource will be removed from the pool
-
getPool
-
acquire
public OChannelBinaryAsynchClient acquire(String iServerURL, long timeout, OContextConfiguration clientConfiguration) -
checkIdle
public void checkIdle(long timeout)
-