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 Type
    Method
    Description
    Creates a new resource to be used and to be pooled when the client finishes with it.
    boolean
    reuseResource(K iKey, V iValue)
    Reuses the pooled resource.
  • Method Details

    • createNewResource

      V createNewResource(K iKey)
      Creates a new resource to be used and to be pooled when the client finishes with it.
      Returns:
      The new resource
    • reuseResource

      boolean reuseResource(K iKey, V iValue)
      Reuses the pooled resource.
      Returns:
      true if can be reused, otherwise false. In this case the resource will be removed from the pool