Class Pool<T>

  • Type Parameters:
    T -
    Direct Known Subclasses:
    MpscPool

    public abstract class Pool<T>
    extends Object
    A simple encapsulation to provide a pool of objects.
    • Constructor Detail

    • Method Detail

      • borrow

        public final T borrow()
        Use this to instantiate or return objects from the pool
      • release

        public final void release​(T object)
        Return objects to the pool, they will be either reused or ignored by the max size