- 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 interfaceRecycler.Handle<T>
-
Constructor Summary
Constructors Modifier Constructor Description protectedRecycler()protectedRecycler(int maxCapacityPerThread)protectedRecycler(int maxCapacityPerThread, int maxSharedCapacityFactor)Deprecated.protectedRecycler(int maxCapacityPerThread, int ratio, int chunkSize)protectedRecycler(int maxCapacityPerThread, int maxSharedCapacityFactor, int ratio, int maxDelayedQueuesPerThread)Deprecated.protectedRecycler(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 Tget()protected abstract TnewObject(Recycler.Handle<T> handle)booleanrecycle(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)
-
-