Package org.apache.cassandra.io.util
Class CompressedChunkReader.Mmap
- java.lang.Object
-
- org.apache.cassandra.io.util.AbstractReaderFileProxy
-
- org.apache.cassandra.io.util.CompressedChunkReader
-
- org.apache.cassandra.io.util.CompressedChunkReader.Mmap
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,ChunkReader
,ReaderFileProxy
,RebuffererFactory
- Enclosing class:
- CompressedChunkReader
public static class CompressedChunkReader.Mmap extends CompressedChunkReader
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.cassandra.io.util.CompressedChunkReader
CompressedChunkReader.Mmap, CompressedChunkReader.Standard
-
-
Field Summary
Fields Modifier and Type Field Description protected MmappedRegions
regions
-
Fields inherited from class org.apache.cassandra.io.util.AbstractReaderFileProxy
channel, fileLength
-
-
Constructor Summary
Constructors Constructor Description Mmap(ChannelProxy channel, CompressionMetadata metadata, MmappedRegions regions, java.util.function.Supplier<java.lang.Double> crcCheckChanceSupplier)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
readChunk(long position, java.nio.ByteBuffer uncompressed)
Read the chunk at the given position, attempting to fill the capacity of the given buffer.-
Methods inherited from class org.apache.cassandra.io.util.CompressedChunkReader
chunkSize, getCrcCheckChance, instantiateRebufferer, preferredBufferType, toString
-
Methods inherited from class org.apache.cassandra.io.util.AbstractReaderFileProxy
channel, fileLength
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.cassandra.io.util.ReaderFileProxy
channel, fileLength
-
-
-
-
Field Detail
-
regions
protected final MmappedRegions regions
-
-
Constructor Detail
-
Mmap
public Mmap(ChannelProxy channel, CompressionMetadata metadata, MmappedRegions regions, java.util.function.Supplier<java.lang.Double> crcCheckChanceSupplier)
-
-
Method Detail
-
readChunk
public void readChunk(long position, java.nio.ByteBuffer uncompressed)
Description copied from interface:ChunkReader
Read the chunk at the given position, attempting to fill the capacity of the given buffer. The filled buffer must be positioned at 0, with limit set at the size of the available data. The source may have requirements for the positioning and/or size of the buffer (e.g. chunk-aligned and chunk-sized). These must be satisfied by the caller.
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfaceReaderFileProxy
- Overrides:
close
in classAbstractReaderFileProxy
-
-