Package com.aerospike.client.util
Class ThreadLocalData
java.lang.Object
com.aerospike.client.util.ThreadLocalData
Thread local buffer storage.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic intInitial buffer size on first use of thread local buffer. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]Return thread local buffer.static byte[]resizeBuffer(int size) Resize and return thread local buffer if the requested size <= 128 KB.
-
Field Details
-
DefaultBufferSize
public static int DefaultBufferSizeInitial buffer size on first use of thread local buffer.
-
-
Constructor Details
-
ThreadLocalData
public ThreadLocalData()
-
-
Method Details
-
getBuffer
public static byte[] getBuffer()Return thread local buffer. -
resizeBuffer
public static byte[] resizeBuffer(int size) Resize and return thread local buffer if the requested size <= 128 KB. Otherwise, the thread local buffer will not be resized and a new buffer will be returned from heap memory.This method should only be called when the current buffer is too small to hold the desired data.
-