Class BasePinotLBuffer
- java.lang.Object
-
- org.apache.pinot.segment.spi.memory.PinotDataBuffer
-
- org.apache.pinot.segment.spi.memory.BasePinotLBuffer
-
- All Implemented Interfaces:
Closeable,AutoCloseable
- Direct Known Subclasses:
PinotNativeOrderLBuffer,PinotNonNativeOrderLBuffer
@ThreadSafe public abstract class BasePinotLBuffer extends PinotDataBuffer
-
-
Field Summary
Fields Modifier and Type Field Description protected xerial.larray.buffer.LBufferAPI_buffer-
Fields inherited from class org.apache.pinot.segment.spi.memory.PinotDataBuffer
BULK_BYTES_PROCESSING_THRESHOLD, NATIVE_ORDER, NON_NATIVE_ORDER
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedBasePinotLBuffer(xerial.larray.buffer.LBufferAPI buffer, boolean closeable, boolean flushable)
-
Method Summary
Modifier and Type Method Description voidcopyTo(long offset, byte[] buffer, int destOffset, int size)voidcopyTo(long offset, PinotDataBuffer buffer, long destOffset, long size)voidflush()bytegetByte(int offset)bytegetByte(long offset)voidputByte(int offset, byte value)voidputByte(long offset, byte value)voidreadFrom(long offset, byte[] buffer, int srcOffset, int size)voidreadFrom(long offset, File file, long srcOffset, long size)voidreadFrom(long offset, ByteBuffer buffer)voidrelease()longsize()ByteBuffertoDirectByteBuffer(long offset, int size, ByteOrder byteOrder)PinotDataBufferview(long start, long end, ByteOrder byteOrder)Creates a view of the range [start, end) of this buffer with the given byte order.-
Methods inherited from class org.apache.pinot.segment.spi.memory.PinotDataBuffer
allocateDirect, close, copyTo, getAllocationFailureCount, getBufferInfo, getChar, getChar, getDirectBufferCount, getDirectBufferUsage, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getLong, getLong, getMmapBufferCount, getMmapBufferUsage, getShort, getShort, loadBigEndianFile, loadFile, mapFile, mapReadOnlyBigEndianFile, order, putChar, putChar, putDouble, putDouble, putFloat, putFloat, putInt, putInt, putLong, putLong, putShort, putShort, readFrom, toDirectByteBuffer, view
-
-
-
-
Method Detail
-
getByte
public byte getByte(int offset)
- Specified by:
getBytein classPinotDataBuffer
-
getByte
public byte getByte(long offset)
- Specified by:
getBytein classPinotDataBuffer
-
putByte
public void putByte(int offset, byte value)- Specified by:
putBytein classPinotDataBuffer
-
putByte
public void putByte(long offset, byte value)- Specified by:
putBytein classPinotDataBuffer
-
copyTo
public void copyTo(long offset, byte[] buffer, int destOffset, int size)- Specified by:
copyToin classPinotDataBuffer
-
copyTo
public void copyTo(long offset, PinotDataBuffer buffer, long destOffset, long size)- Specified by:
copyToin classPinotDataBuffer
-
readFrom
public void readFrom(long offset, byte[] buffer, int srcOffset, int size)- Specified by:
readFromin classPinotDataBuffer
-
readFrom
public void readFrom(long offset, ByteBuffer buffer)- Specified by:
readFromin classPinotDataBuffer
-
readFrom
public void readFrom(long offset, File file, long srcOffset, long size) throws IOException- Specified by:
readFromin classPinotDataBuffer- Throws:
IOException
-
size
public long size()
- Specified by:
sizein classPinotDataBuffer
-
view
public PinotDataBuffer view(long start, long end, ByteOrder byteOrder)
Description copied from class:PinotDataBufferCreates a view of the range [start, end) of this buffer with the given byte order. CallingPinotDataBuffer.flush()orPinotDataBuffer.close()has no effect on view.- Specified by:
viewin classPinotDataBuffer
-
toDirectByteBuffer
public ByteBuffer toDirectByteBuffer(long offset, int size, ByteOrder byteOrder)
- Specified by:
toDirectByteBufferin classPinotDataBuffer
-
flush
public void flush()
- Specified by:
flushin classPinotDataBuffer
-
release
public void release() throws IOException- Specified by:
releasein classPinotDataBuffer- Throws:
IOException
-
-