Interface ConnectionCache


public interface ConnectionCache
Interface for a cache of connections. It's intended for mapping connections to executing threads.
Author:
Luis Barreiro
  • Method Summary

    Modifier and Type
    Method
    Description
    get()
    Get a acquirable object from cache.
    An implementation that does not cache.
    void
    put(Acquirable acquirable)
    Cache an acquirable object on this cache.
    void
    Reset the cache.
  • Method Details

    • none

      static ConnectionCache none()
      An implementation that does not cache.
    • get

      Acquirable get()
      Get a acquirable object from cache.
      Returns:
      a connection successfully acquired, according to Acquirable.acquire()
    • put

      void put(Acquirable acquirable)
      Cache an acquirable object on this cache.
    • reset

      void reset()
      Reset the cache.