public class ConcurrentDequeRecycler<T> extends DequeRecycler<T>
Recycler implementation based on a concurrent Deque. This implementation is thread-safe.Recycler.C<T>, Recycler.Factory<T>, Recycler.V<T>| Modifier and Type | Field and Description |
|---|---|
protected Recycler.C<T> |
c |
| Constructor and Description |
|---|
ConcurrentDequeRecycler(Recycler.C<T> c,
int maxSize) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
afterRelease(boolean recycled)
Called after a release.
|
protected boolean |
beforeRelease()
Called before releasing an object, returns true if the object should be recycled and false otherwise.
|
void |
close() |
Recycler.V<T> |
obtain() |
Recycler.V<T> |
obtain(int sizing) |
protected final Recycler.C<T> c
public ConcurrentDequeRecycler(Recycler.C<T> c, int maxSize)
public void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in interface Releasableclose in interface Recycler<T>close in class DequeRecycler<T>public Recycler.V<T> obtain(int sizing)
protected boolean beforeRelease()
DequeRecyclerbeforeRelease in class DequeRecycler<T>protected void afterRelease(boolean recycled)
DequeRecyclerafterRelease in class DequeRecycler<T>public Recycler.V<T> obtain()