Interface Pool<T>

All Known Implementing Classes:
Pool.Impl

public interface Pool<T>
Pool of reusable objects that are indistinguishable from each other, such as JAXB marshallers.
Author:
Kohsuke Kawaguchi
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    Default implementation that uses ConcurrentLinkedQueue as the data store.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Returns an object back to the pool.
    Gets a new object from the pool.
  • Method Details

    • take

      @NotNull T take()
      Gets a new object from the pool.

      If no object is available in the pool, this method creates a new one.

    • recycle

      void recycle(@NotNull T t)
      Returns an object back to the pool.