public final class JsonRecyclerPools extends Object
RecyclerPool implementations to be used by the default
JSON-backed JsonFactory for recycling BufferRecycler
containers.| Modifier and Type | Class and Description |
|---|---|
static class |
JsonRecyclerPools.BoundedPool
RecyclerPool implementation that uses
a bounded queue (ArrayBlockingQueue for recycling instances. |
static class |
JsonRecyclerPools.ConcurrentDequePool
RecyclerPool implementation that uses
ConcurrentLinkedDeque for recycling instances. |
static class |
JsonRecyclerPools.LockFreePool
Deprecated.
Since 2.18: use other implementations instead
|
static class |
JsonRecyclerPools.NonRecyclingPool
Dummy
RecyclerPool implementation that does not recycle
anything but simply creates new instances when asked to acquire items. |
static class |
JsonRecyclerPools.ThreadLocalPool
ThreadLocal-based RecyclerPool implementation used for
recycling BufferRecycler instances:
see RecyclerPool.ThreadLocalPoolBase for full explanation
of functioning. |
| Constructor and Description |
|---|
JsonRecyclerPools() |
| Modifier and Type | Method and Description |
|---|---|
static RecyclerPool<BufferRecycler> |
defaultPool()
Method to call to get the default recycler pool instance:
as of Jackson 2.18 this is same as calling
threadLocalPool(): Jackson 2.17.0 instead had this call
newLockFreePool() but this was reverted due to problems reported. |
static RecyclerPool<BufferRecycler> |
newBoundedPool(int size)
Accessor for constructing a new, non-shared
JsonRecyclerPools.BoundedPool instance. |
static RecyclerPool<BufferRecycler> |
newConcurrentDequePool()
Accessor for constructing a new, non-shared
JsonRecyclerPools.ConcurrentDequePool instance. |
static RecyclerPool<BufferRecycler> |
newLockFreePool()
Deprecated.
Since 2.18: use one of other implementations instead;
see
JsonRecyclerPools.LockFreePool Javadocs for details |
static RecyclerPool<BufferRecycler> |
nonRecyclingPool()
Accessor for getting the shared/global
JsonRecyclerPools.NonRecyclingPool instance
(due to design only one instance ever needed) |
static RecyclerPool<BufferRecycler> |
sharedBoundedPool()
Accessor for getting the shared/global
JsonRecyclerPools.BoundedPool instance. |
static RecyclerPool<BufferRecycler> |
sharedConcurrentDequePool()
Accessor for getting the shared/global
JsonRecyclerPools.ConcurrentDequePool instance. |
static RecyclerPool<BufferRecycler> |
sharedLockFreePool()
Deprecated.
Since 2.18: use one of other implementations instead;
see
JsonRecyclerPools.LockFreePool Javadocs for details |
static RecyclerPool<BufferRecycler> |
threadLocalPool()
Accessor for getting the shared/global
JsonRecyclerPools.ThreadLocalPool instance
(due to design only one instance ever needed) |
public static RecyclerPool<BufferRecycler> defaultPool()
threadLocalPool(): Jackson 2.17.0 instead had this call
newLockFreePool() but this was reverted due to problems reported.
Default pool will likely be changed in Jackson 3.0 to something else.
RecyclerPool implementation to use
if no specific implementation desired.public static RecyclerPool<BufferRecycler> threadLocalPool()
JsonRecyclerPools.ThreadLocalPool instance
(due to design only one instance ever needed)JsonRecyclerPools.ThreadLocalPoolpublic static RecyclerPool<BufferRecycler> nonRecyclingPool()
JsonRecyclerPools.NonRecyclingPool instance
(due to design only one instance ever needed)JsonRecyclerPools.NonRecyclingPool.public static RecyclerPool<BufferRecycler> sharedConcurrentDequePool()
JsonRecyclerPools.ConcurrentDequePool instance.JsonRecyclerPools.NonRecyclingPool.public static RecyclerPool<BufferRecycler> newConcurrentDequePool()
JsonRecyclerPools.ConcurrentDequePool instance.JsonRecyclerPools.NonRecyclingPool.@Deprecated public static RecyclerPool<BufferRecycler> sharedLockFreePool()
JsonRecyclerPools.LockFreePool Javadocs for detailsJsonRecyclerPools.LockFreePool instance.JsonRecyclerPools.LockFreePool.@Deprecated public static RecyclerPool<BufferRecycler> newLockFreePool()
JsonRecyclerPools.LockFreePool Javadocs for detailsJsonRecyclerPools.LockFreePool instance.JsonRecyclerPools.LockFreePool.public static RecyclerPool<BufferRecycler> sharedBoundedPool()
JsonRecyclerPools.BoundedPool instance.JsonRecyclerPools.BoundedPool.public static RecyclerPool<BufferRecycler> newBoundedPool(int size)
JsonRecyclerPools.BoundedPool instance.size - Maximum number of values to poolJsonRecyclerPools.BoundedPool.Copyright © 2008–2024 FasterXML. All rights reserved.