Class PoolChunkList<T>

    • Field Detail

      • EMPTY_METRICS

        private static final java.util.Iterator<PoolChunkMetric> EMPTY_METRICS
      • minUsage

        private final int minUsage
      • maxUsage

        private final int maxUsage
      • maxCapacity

        private final int maxCapacity
      • freeMinThreshold

        private final int freeMinThreshold
      • freeMaxThreshold

        private final int freeMaxThreshold
    • Constructor Detail

      • PoolChunkList

        PoolChunkList​(PoolArena<T> arena,
                      PoolChunkList<T> nextList,
                      int minUsage,
                      int maxUsage,
                      int chunkSize)
    • Method Detail

      • calculateMaxCapacity

        private static int calculateMaxCapacity​(int minUsage,
                                                int chunkSize)
        Calculates the maximum capacity of a buffer that will ever be possible to allocate out of the PoolChunks that belong to the PoolChunkList with the given minUsage and maxUsage settings.
      • free

        boolean free​(PoolChunk<T> chunk,
                     long handle,
                     java.nio.ByteBuffer nioBuffer)
      • move

        private boolean move​(PoolChunk<T> chunk)
      • remove

        private void remove​(PoolChunk<T> cur)
      • minUsage

        public int minUsage()
        Description copied from interface: PoolChunkListMetric
        Return the minimum usage of the chunk list before which chunks are promoted to the previous list.
        Specified by:
        minUsage in interface PoolChunkListMetric
      • maxUsage

        public int maxUsage()
        Description copied from interface: PoolChunkListMetric
        Return the maximum usage of the chunk list after which chunks are promoted to the next list.
        Specified by:
        maxUsage in interface PoolChunkListMetric
      • minUsage0

        private static int minUsage0​(int value)
      • iterator

        public java.util.Iterator<PoolChunkMetric> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<T>
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object