Interface BufferAccess<A>

All Superinterfaces:
ArrayDataAccess<A>, DataAccess, Serializable, VolatileAccess
All Known Implementing Classes:
AbstractBufferAccess, ByteBufferAccess, CharBufferAccess, DoubleBufferAccess, FloatBufferAccess, IntBufferAccess, LongBufferAccess, ShortBufferAccess

public interface BufferAccess<A> extends VolatileAccess, ArrayDataAccess<A>
BufferAccess wraps java.nio.Buffer subclasses and implements ArrayDataAccess and VolatileAccess. Subclasses should be able to be constructed from either a specific buffer (e.g. LongBuffer) or ByteBuffer.
  • Method Details

    • isDirect

      boolean isDirect()
      Determine if the underlying Buffer is allocated direct (outside of the JVM).
      Returns:
      true if the Buffer is direct.
      See Also:
    • isReadOnly

      boolean isReadOnly()
      Determine if data can be read only and not written
      Returns:
      See Also:
    • getNumBytesPerEntity

      int getNumBytesPerEntity()
      Get number of bytes for one entity in this BufferAccess. This usually retrieves a static field.
      Returns:
      number of bytes
    • newInstance

      A newInstance(ByteBuffer buffer, boolean isValid)
      Create a new instance from a ByteBuffer
      Parameters:
      buffer -
      isValid -
      Returns: