Interface OResourcePoolListener<K,V>
- All Known Implementing Classes:
OPolyglotScriptExecutor,ORemoteConnectionPool
public interface OResourcePoolListener<K,V>
Interface to manage resources in the pool.
- Author:
- Luca Garulli (l.garulli--(at)--orientdb.com)
-
Method Summary
Modifier and TypeMethodDescriptioncreateNewResource(K iKey) Creates a new resource to be used and to be pooled when the client finishes with it.booleanreuseResource(K iKey, V iValue) Reuses the pooled resource.
-
Method Details
-
createNewResource
Creates a new resource to be used and to be pooled when the client finishes with it.- Returns:
- The new resource
-
reuseResource
Reuses the pooled resource.- Returns:
- true if can be reused, otherwise false. In this case the resource will be removed from the pool
-