Class Recycler.LocalPool<H,T>

java.lang.Object
io.netty.util.Recycler.LocalPool<H,T>
Direct Known Subclasses:
Recycler.GuardedLocalPool, Recycler.UnguardedLocalPool
Enclosing class:
Recycler<T>

private abstract static class Recycler.LocalPool<H,T> extends java.lang.Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final H[]
     
    private int
     
    private java.lang.Thread
     
    private org.jctools.queues.MessagePassingQueue<H>
     
    private int
     
    private final int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    LocalPool(int maxCapacity)
     
    LocalPool(int maxCapacity, int ratioInterval, int chunkSize)
     
    LocalPool(java.lang.Thread owner, int maxCapacity, int ratioInterval, int chunkSize)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected final H
     
    (package private) boolean
     
    private static <H> org.jctools.queues.MessagePassingQueue<H>
    createExternalMcPool(int maxCapacity)
     
    private static <H> org.jctools.queues.MessagePassingQueue<H>
    createExternalScPool(int chunkSize, int maxCapacity)
     
    (package private) abstract T
    getWith(Recycler<T> recycler)
     
    private static boolean
    isTerminated(java.lang.Thread owner)
     
    protected final void
    release(H handle)
     
    (package private) int
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • ratioInterval

      private final int ratioInterval
    • batch

      private final H[] batch
    • batchSize

      private int batchSize
    • owner

      private java.lang.Thread owner
    • pooledHandles

      private org.jctools.queues.MessagePassingQueue<H> pooledHandles
    • ratioCounter

      private int ratioCounter
  • Constructor Details

    • LocalPool

      LocalPool(int maxCapacity)
    • LocalPool

      LocalPool(java.lang.Thread owner, int maxCapacity, int ratioInterval, int chunkSize)
    • LocalPool

      LocalPool(int maxCapacity, int ratioInterval, int chunkSize)
  • Method Details

    • createExternalMcPool

      private static <H> org.jctools.queues.MessagePassingQueue<H> createExternalMcPool(int maxCapacity)
    • createExternalScPool

      private static <H> org.jctools.queues.MessagePassingQueue<H> createExternalScPool(int chunkSize, int maxCapacity)
    • acquire

      protected final H acquire()
    • release

      protected final void release(H handle)
    • isTerminated

      private static boolean isTerminated(java.lang.Thread owner)
    • canAllocatePooled

      boolean canAllocatePooled()
    • getWith

      abstract T getWith(Recycler<T> recycler)
    • size

      int size()