Package cn.sliew.milky.common.recycler
Class ConcurrentDequeRecycler<T>
- java.lang.Object
-
- cn.sliew.milky.common.recycler.DequeRecycler<T>
-
- cn.sliew.milky.common.recycler.ConcurrentDequeRecycler<T>
-
- All Implemented Interfaces:
Recycler<T>
public class ConcurrentDequeRecycler<T> extends DequeRecycler<T>
-
-
Constructor Summary
Constructors Constructor Description ConcurrentDequeRecycler(Source<T> source, int maxSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidafterRelease(boolean recycled)Called after a release.protected booleanbeforeRelease()Called before releasing an object, returns true if the object should be recycled and false otherwise.Value<T>obtain()
-
-
-
Field Detail
-
source
protected final Source<T> source
-
-
Method Detail
-
beforeRelease
protected boolean beforeRelease()
Description copied from class:DequeRecyclerCalled before releasing an object, returns true if the object should be recycled and false otherwise.- Overrides:
beforeReleasein classDequeRecycler<T>
-
afterRelease
protected void afterRelease(boolean recycled)
Description copied from class:DequeRecyclerCalled after a release.- Overrides:
afterReleasein classDequeRecycler<T>
-
-