Class PinotByteBuffer
- java.lang.Object
-
- org.apache.pinot.segment.spi.memory.PinotDataBuffer
-
- org.apache.pinot.segment.spi.memory.PinotByteBuffer
-
- All Implemented Interfaces:
Closeable,AutoCloseable
@ThreadSafe public class PinotByteBuffer extends PinotDataBuffer
-
-
Field Summary
-
Fields inherited from class org.apache.pinot.segment.spi.memory.PinotDataBuffer
BULK_BYTES_PROCESSING_THRESHOLD, NATIVE_ORDER, NON_NATIVE_ORDER
-
-
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)chargetChar(int offset)chargetChar(long offset)doublegetDouble(int offset)doublegetDouble(long offset)floatgetFloat(int offset)floatgetFloat(long offset)intgetInt(int offset)intgetInt(long offset)longgetLong(int offset)longgetLong(long offset)shortgetShort(int offset)shortgetShort(long offset)ByteOrderorder()voidputByte(int offset, byte value)voidputByte(long offset, byte value)voidputChar(int offset, char value)voidputChar(long offset, char value)voidputDouble(int offset, double value)voidputDouble(long offset, double value)voidputFloat(int offset, float value)voidputFloat(long offset, float value)voidputInt(int offset, int value)voidputInt(long offset, int value)voidputLong(int offset, long value)voidputLong(long offset, long value)voidputShort(int offset, short value)voidputShort(long offset, short 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, getDirectBufferCount, getDirectBufferUsage, getMmapBufferCount, getMmapBufferUsage, loadBigEndianFile, loadFile, mapFile, mapReadOnlyBigEndianFile, 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
-
getChar
public char getChar(int offset)
- Specified by:
getCharin classPinotDataBuffer
-
getChar
public char getChar(long offset)
- Specified by:
getCharin classPinotDataBuffer
-
putChar
public void putChar(int offset, char value)- Specified by:
putCharin classPinotDataBuffer
-
putChar
public void putChar(long offset, char value)- Specified by:
putCharin classPinotDataBuffer
-
getShort
public short getShort(int offset)
- Specified by:
getShortin classPinotDataBuffer
-
getShort
public short getShort(long offset)
- Specified by:
getShortin classPinotDataBuffer
-
putShort
public void putShort(int offset, short value)- Specified by:
putShortin classPinotDataBuffer
-
putShort
public void putShort(long offset, short value)- Specified by:
putShortin classPinotDataBuffer
-
getInt
public int getInt(int offset)
- Specified by:
getIntin classPinotDataBuffer
-
getInt
public int getInt(long offset)
- Specified by:
getIntin classPinotDataBuffer
-
putInt
public void putInt(int offset, int value)- Specified by:
putIntin classPinotDataBuffer
-
putInt
public void putInt(long offset, int value)- Specified by:
putIntin classPinotDataBuffer
-
getLong
public long getLong(int offset)
- Specified by:
getLongin classPinotDataBuffer
-
getLong
public long getLong(long offset)
- Specified by:
getLongin classPinotDataBuffer
-
putLong
public void putLong(int offset, long value)- Specified by:
putLongin classPinotDataBuffer
-
putLong
public void putLong(long offset, long value)- Specified by:
putLongin classPinotDataBuffer
-
getFloat
public float getFloat(int offset)
- Specified by:
getFloatin classPinotDataBuffer
-
getFloat
public float getFloat(long offset)
- Specified by:
getFloatin classPinotDataBuffer
-
putFloat
public void putFloat(int offset, float value)- Specified by:
putFloatin classPinotDataBuffer
-
putFloat
public void putFloat(long offset, float value)- Specified by:
putFloatin classPinotDataBuffer
-
getDouble
public double getDouble(int offset)
- Specified by:
getDoublein classPinotDataBuffer
-
getDouble
public double getDouble(long offset)
- Specified by:
getDoublein classPinotDataBuffer
-
putDouble
public void putDouble(int offset, double value)- Specified by:
putDoublein classPinotDataBuffer
-
putDouble
public void putDouble(long offset, double value)- Specified by:
putDoublein 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
-
order
public ByteOrder order()
- Specified by:
orderin 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
-
-