Class RecyclerPool.ConcurrentDequePoolBase<P extends RecyclerPool.WithPool<P>>

java.lang.Object
com.fasterxml.jackson.core.util.RecyclerPool.StatefulImplBase<P>
com.fasterxml.jackson.core.util.RecyclerPool.ConcurrentDequePoolBase<P>
All Implemented Interfaces:
RecyclerPool<P>, Serializable
Direct Known Subclasses:
JsonRecyclerPools.ConcurrentDequePool
Enclosing interface:
RecyclerPool<P extends RecyclerPool.WithPool<P>>

public abstract static class RecyclerPool.ConcurrentDequePoolBase<P extends RecyclerPool.WithPool<P>> extends RecyclerPool.StatefulImplBase<P>
RecyclerPool implementation that uses ConcurrentLinkedDeque for recycling instances.

Pool is unbounded: see RecyclerPool what this means.

See Also:
  • Field Details

  • Constructor Details

    • ConcurrentDequePoolBase

      protected ConcurrentDequePoolBase(int serialization)
  • Method Details

    • acquirePooled

      public P acquirePooled()
      Description copied from interface: RecyclerPool
      Method for sub-classes to implement for actual acquire logic; called by RecyclerPool.acquireAndLinkPooled().
      Returns:
      Instance acquired (pooled or just constructed)
    • releasePooled

      public void releasePooled(P pooled)
      Description copied from interface: RecyclerPool
      Method that should be called when previously acquired (see RecyclerPool.acquireAndLinkPooled()) pooled value that is no longer needed; this lets pool to take ownership for possible reuse.
      Parameters:
      pooled - Pooled instance to release back to pool