Package io.minio

Class ByteBufferPool

java.lang.Object
io.minio.ByteBufferPool

public class ByteBufferPool extends Object
Pool of ByteBuffer to be used in parallel part uploads.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ByteBufferPool(int capacity, long bufferSize)
    Creates given capacity pool of ByteBuffer with buffer size.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    put(ByteBuffer buffer)
    Inserts the specified buffer into this pool, ignore if the pool is full.
    Retrieves and removes the head of this pool, or returns new ByteBuffer if this pool is empty.

    Methods inherited from class java.lang.Object

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

    • ByteBufferPool

      public ByteBufferPool(int capacity, long bufferSize)
      Creates given capacity pool of ByteBuffer with buffer size.
  • Method Details

    • take

      public ByteBuffer take()
      Retrieves and removes the head of this pool, or returns new ByteBuffer if this pool is empty.
    • put

      public void put(ByteBuffer buffer)
      Inserts the specified buffer into this pool, ignore if the pool is full.