Package io.netty.util

Class Recycler<T>

  • Type Parameters:
    T - the type of the pooled object

    public abstract class Recycler<T>
    extends java.lang.Object
    Light-weight object pool based on a thread-local stack.
    • Field Detail

      • DEFAULT_INITIAL_MAX_CAPACITY_PER_THREAD

        private static final int DEFAULT_INITIAL_MAX_CAPACITY_PER_THREAD
        See Also:
        Constant Field Values
      • DEFAULT_MAX_CAPACITY_PER_THREAD

        private static final int DEFAULT_MAX_CAPACITY_PER_THREAD
      • RATIO

        private static final int RATIO
      • DEFAULT_QUEUE_CHUNK_SIZE_PER_THREAD

        private static final int DEFAULT_QUEUE_CHUNK_SIZE_PER_THREAD
      • BLOCKING_POOL

        private static final boolean BLOCKING_POOL
      • BATCH_FAST_TL_ONLY

        private static final boolean BATCH_FAST_TL_ONLY
      • maxCapacityPerThread

        private final int maxCapacityPerThread
      • interval

        private final int interval
      • chunkSize

        private final int chunkSize
    • Constructor Detail

      • Recycler

        protected Recycler()
      • Recycler

        protected Recycler​(int maxCapacityPerThread)
      • Recycler

        @Deprecated
        protected Recycler​(int maxCapacityPerThread,
                           int maxSharedCapacityFactor,
                           int ratio,
                           int maxDelayedQueuesPerThread)
        Deprecated.
        Use one of the following instead: Recycler(), Recycler(int), Recycler(int, int, int).
      • Recycler

        @Deprecated
        protected Recycler​(int maxCapacityPerThread,
                           int maxSharedCapacityFactor,
                           int ratio,
                           int maxDelayedQueuesPerThread,
                           int delayedQueueRatio)
        Deprecated.
        Use one of the following instead: Recycler(), Recycler(int), Recycler(int, int, int).
      • Recycler

        protected Recycler​(int maxCapacityPerThread,
                           int ratio,
                           int chunkSize)