Package org.apache.cassandra.io.util
Class ThreadLocalByteBufferHolder
java.lang.Object
org.apache.cassandra.io.util.ThreadLocalByteBufferHolder
Utility class that allow buffers to be reused by storing them in a thread local instance.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ThreadLocalByteBufferHolder
-
-
Method Details
-
getBuffer
Returns the buffer for the current thread.If the buffer for the current thread does not have a capacity large enough. A new buffer with the requested size will be instatiated an will replace the existing one.
- Parameters:
size- the buffer size- Returns:
- the buffer for the current thread.
-