Class MappedBuffer
- java.lang.Object
-
- org.apache.cassandra.index.sasi.utils.MappedBuffer
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public class MappedBuffer extends java.lang.Object implements java.io.Closeable
-
-
Constructor Summary
Constructors Modifier Constructor Description MappedBuffer(ChannelProxy file)protectedMappedBuffer(ChannelProxy file, int numPageBits)MappedBuffer(RandomAccessReader file)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longcapacity()voidclose()intcomparePageTo(long offset, int length, AbstractType<?> comparator, java.nio.ByteBuffer other)MappedBufferduplicate()byteget()byteget(long pos)intgetInt()intgetInt(long pos)longgetLong()longgetLong(long pos)java.nio.ByteBuffergetPageRegion(long position, int length)shortgetShort()shortgetShort(long pos)booleanhasRemaining()longlimit()MappedBufferlimit(long newLimit)longposition()MappedBufferposition(long newPosition)longremaining()
-
-
-
Constructor Detail
-
MappedBuffer
public MappedBuffer(RandomAccessReader file)
-
MappedBuffer
public MappedBuffer(ChannelProxy file)
-
MappedBuffer
protected MappedBuffer(ChannelProxy file, int numPageBits)
-
-
Method Detail
-
comparePageTo
public int comparePageTo(long offset, int length, AbstractType<?> comparator, java.nio.ByteBuffer other)
-
capacity
public long capacity()
-
position
public long position()
-
position
public MappedBuffer position(long newPosition)
-
limit
public long limit()
-
limit
public MappedBuffer limit(long newLimit)
-
remaining
public long remaining()
-
hasRemaining
public boolean hasRemaining()
-
get
public byte get()
-
get
public byte get(long pos)
-
getShort
public short getShort()
-
getShort
public short getShort(long pos)
-
getInt
public int getInt()
-
getInt
public int getInt(long pos)
-
getLong
public long getLong()
-
getLong
public long getLong(long pos)
-
getPageRegion
public java.nio.ByteBuffer getPageRegion(long position, int length)
-
duplicate
public MappedBuffer duplicate()
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable
-
-