Class AdaptivePoolingAllocator.Chunk

java.lang.Object
io.netty.buffer.AdaptivePoolingAllocator.Chunk
All Implemented Interfaces:
ChunkInfo
Direct Known Subclasses:
AdaptivePoolingAllocator.BuddyChunk, AdaptivePoolingAllocator.SizeClassedChunk
Enclosing class:
AdaptivePoolingAllocator

static class AdaptivePoolingAllocator.Chunk extends Object implements ChunkInfo
  • Field Details

  • Constructor Details

  • Method Details

    • currentMagazine

    • detachFromMagazine

      void detachFromMagazine()
    • attachToMagazine

      void attachToMagazine(AdaptivePoolingAllocator.Magazine magazine)
    • releaseFromMagazine

      void releaseFromMagazine()
      Called when a magazine is done using this chunk, probably because it was emptied.
    • releaseSegment

      void releaseSegment(int ignoredSegmentId, int size)
      Called when a ByteBuf is done using its allocation in this chunk.
    • markToDeallocate

      void markToDeallocate()
    • retain

      private void retain()
    • release

      protected boolean release()
    • deallocate

      protected void deallocate()
    • onRelease

      private void onRelease()
    • readInitInto

      public boolean readInitInto(AdaptivePoolingAllocator.AdaptiveByteBuf buf, int size, int startingCapacity, int maxCapacity)
    • remainingCapacity

      public int remainingCapacity()
    • hasUnprocessedFreelistEntries

      public boolean hasUnprocessedFreelistEntries()
    • processFreelistEntries

      public void processFreelistEntries()
    • capacity

      public int capacity()
      Description copied from interface: ChunkInfo
      The capacity of the chunk, in bytes.
      Specified by:
      capacity in interface ChunkInfo
    • isDirect

      public boolean isDirect()
      Description copied from interface: ChunkInfo
      true if the chunk contain native memory, otherwise false.
      Specified by:
      isDirect in interface ChunkInfo
    • memoryAddress

      public long memoryAddress()
      Description copied from interface: ChunkInfo
      The native memory address of the chunk, if any, otherwise zero.
      Specified by:
      memoryAddress in interface ChunkInfo