Class DirectByteBufferPool
java.lang.Object
ecmwf.common.technical.DirectByteBufferPool
The Class DirectByteBufferPool.
-
Constructor Summary
ConstructorsConstructorDescriptionDirectByteBufferPool(int bufferSizeInBytes, long maxIdleMillis) Instantiates a new direct byte buffer pool. -
Method Summary
Modifier and TypeMethodDescriptionacquire()Acquire.intCurrent pool size.intlongGets the total allocated.longGets the total released.longGets the total reused.voidrelease(ByteBuffer buffer) Release.voidshutdown()Shutdown.
-
Constructor Details
-
DirectByteBufferPool
public DirectByteBufferPool(int bufferSizeInBytes, long maxIdleMillis) Instantiates a new direct byte buffer pool.- Parameters:
bufferSizeInBytes- the buffer size in bytesmaxIdleMillis- the max idle millis
-
-
Method Details
-
getBufferSizeInBytes
public int getBufferSizeInBytes() -
acquire
-
release
-
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.
-