@Deprecated 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: see RecyclerPool for
details on what this means.
NOTE: serious issues found with 2.17.0 lead to deprecation of this implementation -- basically it is possible to have unbalanced acquire/release success rate lead to excessive growth of pooled instances. See jackson-core#1260 for details.
| Modifier and Type | Class and Description |
|---|---|
protected static class |
RecyclerPool.LockFreePoolBase.Node<P>
Deprecated.
|
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>>_serialization, SERIALIZATION_NON_SHARED, SERIALIZATION_SHARED| Modifier | Constructor and Description |
|---|---|
protected |
LockFreePoolBase(int serialization)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
P |
acquirePooled()
Deprecated.
Method for sub-classes to implement for actual acquire logic; called
by
RecyclerPool.acquireAndLinkPooled(). |
boolean |
clear()
Deprecated.
Optional method that may allow dropping of all pooled Objects; mostly
useful for unbounded pool implementations that may retain significant
memory and that may then be cleared regularly.
|
int |
pooledCount()
Deprecated.
Diagnostic method for obtaining an estimate of number of pooled items
this pool contains, available for recycling.
|
void |
releasePooled(P pooled)
Deprecated.
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. |
_resolveToShared, createPooledclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitacquireAndLinkPooledpublic P acquirePooled()
RecyclerPoolRecyclerPool.acquireAndLinkPooled().public void releasePooled(P pooled)
RecyclerPoolRecyclerPool.acquireAndLinkPooled())
pooled value that is no longer needed; this lets pool to take ownership
for possible reuse.pooled - Pooled instance to release back to poolpublic int pooledCount()
RecyclerPool-1) even when available this may be
just an approximation.
Default method implementation simply returns -1 and is meant to be
overridden by concrete sub-classes.
-1 if not.public boolean clear()
RecyclerPooltrue If pool supports operation and dropped all pooled
Objects; false otherwise.Copyright © 2008–2024 FasterXML. All rights reserved.