Class MappedByteBufferPool

    • Constructor Detail

      • MappedByteBufferPool

        public MappedByteBufferPool()
      • MappedByteBufferPool

        public MappedByteBufferPool​(int factor)
      • MappedByteBufferPool

        public MappedByteBufferPool​(int factor,
                                    int maxQueue)
      • MappedByteBufferPool

        public MappedByteBufferPool​(int factor,
                                    int maxQueue,
                                    java.util.function.Function<java.lang.Integer,​ByteBufferPool.Bucket> newBucket)
    • Method Detail

      • acquire

        public java.nio.ByteBuffer acquire​(int size,
                                           boolean direct)
        Description copied from interface: ByteBufferPool

        Requests a ByteBuffer of the given size.

        The returned buffer may have a bigger capacity than the size being requested but it will have the limit set to the given size.

        Specified by:
        acquire in interface ByteBufferPool
        Parameters:
        size - the size of the buffer
        direct - whether the buffer must be direct or not
        Returns:
        the requested buffer
        See Also:
        ByteBufferPool.release(ByteBuffer)
      • clear

        public void clear()