Interface IPoolManager<T>

  • Type Parameters:
    T - the type of instances to be managed
    All Known Implementing Classes:
    AbstractImportResolverPoolManager

    public interface IPoolManager<T>
    Represents a pool manager (delegate) for a typed pool. Depending on the actual interface of <T> this interface may be implemented directly or in terms of an anonymous class in order to keep the interface of <T> clean.
    Author:
    Holger Eichelberger
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void clear​(T instance)
      Clears an instance before releasing it.
      T create()
      Creates a new element in case that the pool is empty.
    • Method Detail

      • create

        T create()
        Creates a new element in case that the pool is empty.
        Returns:
        the element
      • clear

        void clear​(T instance)
        Clears an instance before releasing it.
        Parameters:
        instance - the instance to be cleared