Interface ObjectPool<T>

All Known Implementing Classes:
DataBufferPool

public interface ObjectPool<T>
Object pool interface that allows reference tracking.
  • Method Details

    • take

      @NotNull PooledObjectReference<T> take()
      Take an item from the pool.
      Returns:
      A reference that encapsulates access to the item, to allow reclamation per the pool implementation's policies.
    • give

      void give​(@NotNull PooledObjectReference<T> itemReference)
      Return an item to the pool (permanently).
      Parameters:
      itemReference - The reference returns previously by a call to give.