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:
AutoCloseable,ChunkReader,ReaderFileProxy,RebuffererFactory
- Enclosing class:
- CompressedChunkReader
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.cassandra.io.util.CompressedChunkReader
CompressedChunkReader.CompressedReader, CompressedChunkReader.Mmap, CompressedChunkReader.Standard -
Field Summary
FieldsFields inherited from class org.apache.cassandra.io.util.AbstractReaderFileProxy
channel, fileLength -
Constructor Summary
ConstructorsConstructorDescriptionMmap(ChannelProxy channel, CompressionMetadata metadata, MmappedRegions regions, Supplier<Double> crcCheckChanceSupplier) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidreadChunk(long position, 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, forScan, getCrcCheckChance, instantiateRebufferer, preferredBufferType, toStringMethods inherited from class org.apache.cassandra.io.util.AbstractReaderFileProxy
channel, fileLengthMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.cassandra.io.util.ChunkReader
releaseUnderlyingResourcesMethods inherited from interface org.apache.cassandra.io.util.ReaderFileProxy
channel, fileLength
-
Field Details
-
regions
-
-
Constructor Details
-
Mmap
public Mmap(ChannelProxy channel, CompressionMetadata metadata, MmappedRegions regions, Supplier<Double> crcCheckChanceSupplier)
-
-
Method Details
-
readChunk
Description copied from interface:ChunkReaderRead 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:
closein interfaceAutoCloseable- Specified by:
closein interfaceReaderFileProxy- Overrides:
closein classAbstractReaderFileProxy
-