Class ThreadLocalData

java.lang.Object
com.aerospike.client.util.ThreadLocalData

public final class ThreadLocalData extends Object
Thread local buffer storage.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static int
    Initial buffer size on first use of thread local buffer.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static byte[]
    Return thread local buffer.
    static byte[]
    resizeBuffer(int size)
    Resize and return thread local buffer if the requested size <= 128 KB.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • DefaultBufferSize

      public static int DefaultBufferSize
      Initial 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.