Class JsonRecyclerPools.ThreadLocalPool
java.lang.Object
tools.jackson.core.util.RecyclerPool.ThreadLocalPoolBase<BufferRecycler>
tools.jackson.core.util.JsonRecyclerPools.ThreadLocalPool
- All Implemented Interfaces:
Serializable, RecyclerPool<BufferRecycler>
- Enclosing class:
JsonRecyclerPools
public static class JsonRecyclerPools.ThreadLocalPool
extends RecyclerPool.ThreadLocalPoolBase<BufferRecycler>
ThreadLocal-based RecyclerPool implementation used for
recycling BufferRecycler instances:
see RecyclerPool.ThreadLocalPoolBase for full explanation
of functioning.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface RecyclerPool
RecyclerPool.BoundedPoolBase<P>, RecyclerPool.ConcurrentDequePoolBase<P>, RecyclerPool.NonRecyclingPoolBase<P>, RecyclerPool.StatefulImplBase<P>, RecyclerPool.ThreadLocalPoolBase<P>, RecyclerPool.WithPool<P> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final ThreadLocal<SoftReference<BufferRecycler>> ThisThreadLocalcontains aSoftReferenceto aBufferRecyclerused to provide a low-cost buffer recycling between reader and writer instances.protected static final JsonRecyclerPools.ThreadLocalPoolprivate static final long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionMethod for sub-classes to implement for actual acquire logic; called byRecyclerPool.acquireAndLinkPooled().protected ObjectMethods inherited from class RecyclerPool.ThreadLocalPoolBase
acquireAndLinkPooled, clear, pooledCount, releasePooled
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
GLOBAL
-
_recyclerRef
ThisThreadLocalcontains aSoftReferenceto aBufferRecyclerused to provide a low-cost buffer recycling between reader and writer instances.
-
-
Constructor Details
-
ThreadLocalPool
private ThreadLocalPool()
-
-
Method Details
-
acquirePooled
Description copied from interface:RecyclerPoolMethod for sub-classes to implement for actual acquire logic; called byRecyclerPool.acquireAndLinkPooled().- Specified by:
acquirePooledin interfaceRecyclerPool<BufferRecycler>- Specified by:
acquirePooledin classRecyclerPool.ThreadLocalPoolBase<BufferRecycler>- Returns:
- Instance acquired (pooled or just constructed)
-
readResolve
-