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)
protected
MappedBuffer(ChannelProxy file, int numPageBits)
MappedBuffer(RandomAccessReader file)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
capacity()
void
close()
int
comparePageTo(long offset, int length, AbstractType<?> comparator, java.nio.ByteBuffer other)
MappedBuffer
duplicate()
byte
get()
byte
get(long pos)
int
getInt()
int
getInt(long pos)
long
getLong()
long
getLong(long pos)
java.nio.ByteBuffer
getPageRegion(long position, int length)
short
getShort()
short
getShort(long pos)
boolean
hasRemaining()
long
limit()
MappedBuffer
limit(long newLimit)
long
position()
MappedBuffer
position(long newPosition)
long
remaining()
-
-
-
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:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
-
-