- java.lang.Object
-
- io.netty5.util.Recycler<T>
-
- Type Parameters:
T
- the type of the pooled object
public abstract class Recycler<T> extends Object
Light-weight object pool based on a thread-local stack.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
Recycler.Handle<T>
-
Constructor Summary
Constructors Modifier Constructor Description protected
Recycler()
protected
Recycler(int maxCapacityPerThread)
protected
Recycler(int maxCapacityPerThread, int maxSharedCapacityFactor)
Deprecated.protected
Recycler(int maxCapacityPerThread, int ratio, int chunkSize)
protected
Recycler(int maxCapacityPerThread, int maxSharedCapacityFactor, int ratio, int maxDelayedQueuesPerThread)
Deprecated.protected
Recycler(int maxCapacityPerThread, int maxSharedCapacityFactor, int ratio, int maxDelayedQueuesPerThread, int delayedQueueRatio)
Deprecated.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description T
get()
protected abstract T
newObject(Recycler.Handle<T> handle)
boolean
recycle(T o, Recycler.Handle<T> handle)
Deprecated.
-
-
-
Constructor Detail
-
Recycler
protected Recycler()
-
Recycler
protected Recycler(int maxCapacityPerThread)
-
Recycler
@Deprecated protected Recycler(int maxCapacityPerThread, int maxSharedCapacityFactor)
Deprecated.
-
Recycler
@Deprecated protected Recycler(int maxCapacityPerThread, int maxSharedCapacityFactor, int ratio, int maxDelayedQueuesPerThread)
Deprecated.
-
Recycler
@Deprecated protected Recycler(int maxCapacityPerThread, int maxSharedCapacityFactor, int ratio, int maxDelayedQueuesPerThread, int delayedQueueRatio)
Deprecated.
-
Recycler
protected Recycler(int maxCapacityPerThread, int ratio, int chunkSize)
-
-
Method Detail
-
get
public final T get()
-
recycle
@Deprecated public final boolean recycle(T o, Recycler.Handle<T> handle)
Deprecated.
-
newObject
protected abstract T newObject(Recycler.Handle<T> handle)
-
-