java.lang.Object
tools.jackson.core.util.JsonRecyclerPools
Set of
RecyclerPool implementations to be used by the default
JSON-backed JsonFactory for recycling BufferRecycler
containers.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRecyclerPoolimplementation that uses a bounded queue (ArrayBlockingQueuefor recycling instances.static classRecyclerPoolimplementation that usesConcurrentLinkedDequefor recycling instances.static classDummyRecyclerPoolimplementation that does not recycle anything but simply creates new instances when asked to acquire items.static classThreadLocal-basedRecyclerPoolimplementation used for recyclingBufferRecyclerinstances: seeRecyclerPool.ThreadLocalPoolBasefor full explanation of functioning. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic RecyclerPool<BufferRecycler>Method to call to get the default recycler pool instance: as of Jackson 3.0 and later this is same as callingnewConcurrentDequePool().static RecyclerPool<BufferRecycler>newBoundedPool(int size) Accessor for constructing a new, non-sharedJsonRecyclerPools.BoundedPoolinstance.static RecyclerPool<BufferRecycler>Accessor for constructing a new, non-sharedJsonRecyclerPools.ConcurrentDequePoolinstance.static RecyclerPool<BufferRecycler>Accessor for getting the shared/globalJsonRecyclerPools.NonRecyclingPoolinstance (due to design only one instance ever needed)static RecyclerPool<BufferRecycler>Accessor for getting the shared/globalJsonRecyclerPools.BoundedPoolinstance.static RecyclerPool<BufferRecycler>Accessor for getting the shared/globalJsonRecyclerPools.ConcurrentDequePoolinstance.static RecyclerPool<BufferRecycler>Accessor for getting the shared/globalJsonRecyclerPools.ThreadLocalPoolinstance (due to design only one instance ever needed)
-
Constructor Details
-
JsonRecyclerPools
public JsonRecyclerPools()
-
-
Method Details
-
defaultPool
Method to call to get the default recycler pool instance: as of Jackson 3.0 and later this is same as callingnewConcurrentDequePool().- Returns:
- the default
RecyclerPoolimplementation to use if no specific implementation desired.
-
threadLocalPool
Accessor for getting the shared/globalJsonRecyclerPools.ThreadLocalPoolinstance (due to design only one instance ever needed)- Returns:
- Globally shared instance of
JsonRecyclerPools.ThreadLocalPool
-
nonRecyclingPool
Accessor for getting the shared/globalJsonRecyclerPools.NonRecyclingPoolinstance (due to design only one instance ever needed)- Returns:
- Globally shared instance of
JsonRecyclerPools.NonRecyclingPool.
-
newConcurrentDequePool
Accessor for constructing a new, non-sharedJsonRecyclerPools.ConcurrentDequePoolinstance.- Returns:
- Globally shared instance of
JsonRecyclerPools.NonRecyclingPool.
-
newBoundedPool
Accessor for constructing a new, non-sharedJsonRecyclerPools.BoundedPoolinstance.- Parameters:
size- Maximum number of values to pool- Returns:
- Globally shared instance of
JsonRecyclerPools.BoundedPool.
-