Class DirectByteBufferPool

java.lang.Object
ecmwf.common.technical.DirectByteBufferPool

public class DirectByteBufferPool extends Object
The Class DirectByteBufferPool.
  • Constructor Details

    • DirectByteBufferPool

      public DirectByteBufferPool(int bufferSizeInBytes, long maxIdleMillis)
      Instantiates a new direct byte buffer pool.
      Parameters:
      bufferSizeInBytes - the buffer size in bytes
      maxIdleMillis - the max idle millis
  • Method Details

    • getBufferSizeInBytes

      public int getBufferSizeInBytes()
    • acquire

      public ByteBuffer acquire()
      Acquire.
      Returns:
      the byte buffer
    • release

      public void release(ByteBuffer buffer)
      Release.
      Parameters:
      buffer - the buffer
    • currentPoolSize

      public int currentPoolSize()
      Current pool size.
      Returns:
      the int
    • getTotalAllocated

      public long getTotalAllocated()
      Gets the total allocated.
      Returns:
      the total allocated
    • getTotalReused

      public long getTotalReused()
      Gets the total reused.
      Returns:
      the total reused
    • getTotalReleased

      public long getTotalReleased()
      Gets the total released.
      Returns:
      the total released
    • shutdown

      public void shutdown()
      Shutdown.