Package com.fasterxml.jackson.core.util
Class RecyclerPool.LockFreePoolBase<P extends RecyclerPool.WithPool<P>>
- java.lang.Object
-
- com.fasterxml.jackson.core.util.RecyclerPool.StatefulImplBase<P>
-
- com.fasterxml.jackson.core.util.RecyclerPool.LockFreePoolBase<P>
-
- All Implemented Interfaces:
RecyclerPool<P>
,java.io.Serializable
- Direct Known Subclasses:
JsonRecyclerPools.LockFreePool
- Enclosing interface:
- RecyclerPool<P extends RecyclerPool.WithPool<P>>
public abstract static class RecyclerPool.LockFreePoolBase<P extends RecyclerPool.WithPool<P>> extends RecyclerPool.StatefulImplBase<P>
RecyclerPool
implementation that uses a lock free linked list for recycling instances. Pool is unbounded: seeRecyclerPool
for details on what this means.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.fasterxml.jackson.core.util.RecyclerPool
RecyclerPool.BoundedPoolBase<P extends RecyclerPool.WithPool<P>>, RecyclerPool.ConcurrentDequePoolBase<P extends RecyclerPool.WithPool<P>>, RecyclerPool.LockFreePoolBase<P extends RecyclerPool.WithPool<P>>, RecyclerPool.NonRecyclingPoolBase<P extends RecyclerPool.WithPool<P>>, RecyclerPool.StatefulImplBase<P extends RecyclerPool.WithPool<P>>, RecyclerPool.ThreadLocalPoolBase<P extends RecyclerPool.WithPool<P>>, RecyclerPool.WithPool<P extends RecyclerPool.WithPool<P>>
-
-
Field Summary
-
Fields inherited from class com.fasterxml.jackson.core.util.RecyclerPool.StatefulImplBase
SERIALIZATION_NON_SHARED, SERIALIZATION_SHARED
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description P
acquirePooled()
Method for sub-classes to implement for actual acquire logic; called byRecyclerPool.acquireAndLinkPooled()
.void
releasePooled(P pooled)
Method that should be called when previously acquired (seeRecyclerPool.acquireAndLinkPooled()
) pooled value that is no longer needed; this lets pool to take ownership for possible reuse.-
Methods inherited from class com.fasterxml.jackson.core.util.RecyclerPool.StatefulImplBase
createPooled
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.fasterxml.jackson.core.util.RecyclerPool
acquireAndLinkPooled
-
-
-
-
Method Detail
-
acquirePooled
public P acquirePooled()
Description copied from interface:RecyclerPool
Method for sub-classes to implement for actual acquire logic; called byRecyclerPool.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 (seeRecyclerPool.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
-
-