Class BufferPool
java.lang.Object
org.apache.catalina.tribes.io.BufferPool
Pool for reusing byte buffers in Tribes messaging.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDefault maximum pool size in bytes (100 MiB).protected static BufferPoolSingleton instance of the buffer pool.protected final BufferPool.BufferPoolAPIprotected static final StringManagerString manager for internationalized messages. -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()getBuffer(int minSize, boolean discard) static BufferPoolReturns the singleton buffer pool instance.voidreturnBuffer(XByteBuffer buffer)
-
Field Details
-
DEFAULT_POOL_SIZE
public static final int DEFAULT_POOL_SIZEDefault maximum pool size in bytes (100 MiB).- See Also:
-
sm
String manager for internationalized messages. -
instance
Singleton instance of the buffer pool. -
pool
-
-
Method Details
-
getBuffer
-
returnBuffer
-
clear
public void clear() -
getBufferPool
Returns the singleton buffer pool instance.- Returns:
- the buffer pool
-