Class IoUringBufferRingConfig


  • public final class IoUringBufferRingConfig
    extends java.lang.Object
    Configuration class for an IoUringBufferRing. It will configure the buffer ring size, buffer group id and the chunk size.
    • Constructor Detail

      • IoUringBufferRingConfig

        @Deprecated
        public IoUringBufferRingConfig​(short bgId,
                                       short bufferRingSize,
                                       int maxUnreleasedBuffers,
                                       IoUringBufferRingAllocator allocator)
        Create a new configuration.
        Parameters:
        bgId - the buffer group id to use (must be non-negative).
        bufferRingSize - the size of the ring
        maxUnreleasedBuffers - this parameter is ignored by the buffer ring.
        allocator - the IoUringBufferRingAllocator to use to allocate ByteBufs.
      • IoUringBufferRingConfig

        @Deprecated
        public IoUringBufferRingConfig​(short bgId,
                                       short bufferRingSize,
                                       int batchSize,
                                       int maxUnreleasedBuffers,
                                       boolean incremental,
                                       IoUringBufferRingAllocator allocator)
        Create a new configuration.
        Parameters:
        bgId - the buffer group id to use (must be non-negative).
        bufferRingSize - the size of the ring
        batchSize - the size of the batch on how many buffers are added everytime we need to expand the buffer ring.
        maxUnreleasedBuffers - this parameter is ignored by the buffer ring.
        incremental - true if the buffer ring is using incremental buffer consumption.
        allocator - the IoUringBufferRingAllocator to use to allocate ByteBufs.
    • Method Detail

      • bufferGroupId

        public short bufferGroupId()
        Returns the buffer group id to use.
        Returns:
        the buffer group id to use.
      • bufferRingSize

        public short bufferRingSize()
        Returns the size of the ring.
        Returns:
        the size of the ring.
      • batchSize

        public int batchSize()
        Returns the size of the batch on how many buffers are added everytime we need to expand the buffer ring.
        Returns:
        batch size.
      • maxUnreleasedBuffers

        @Deprecated
        public int maxUnreleasedBuffers()
        Deprecated.
        will be removed as it as no effect.
        Returns the maximum buffers that can be allocated out of this buffer ring and are unreleased yet
        Returns:
        the max unreleased buffers.
      • isBatchAllocation

        public boolean isBatchAllocation()
        Returns true if the ring should always be filled via a batch allocation or false if we will try to allocate a new ByteBuf as we used a buffer from the ring.
        Returns:
        true if the ring should always be filled via a batch allocation.
      • isIncremental

        public boolean isIncremental()
        Returns true if incremental mode should be used for the buffer ring.
        Returns:
        true if incremental mode is used, false otherwise.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object