Package org.apache.cassandra.io.util
Class CompressedChunkReader
java.lang.Object
org.apache.cassandra.io.util.AbstractReaderFileProxy
org.apache.cassandra.io.util.CompressedChunkReader
- All Implemented Interfaces:
AutoCloseable,ChunkReader,ReaderFileProxy,RebuffererFactory
- Direct Known Subclasses:
CompressedChunkReader.Mmap,CompressedChunkReader.Standard
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static interfacestatic classstatic class -
Field Summary
Fields inherited from class org.apache.cassandra.io.util.AbstractReaderFileProxy
channel, fileLength -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCompressedChunkReader(ChannelProxy channel, CompressionMetadata metadata, Supplier<Double> crcCheckChanceSupplier) -
Method Summary
Modifier and TypeMethodDescriptionintBuffer size required for this rebufferer.protected CompressedChunkReaderforScan()doubleNeeded for tests.instantiateRebufferer(boolean isScan) Specifies type of buffer the caller should attempt to give.toString()Methods inherited from class org.apache.cassandra.io.util.AbstractReaderFileProxy
channel, close, 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
readChunk, releaseUnderlyingResourcesMethods inherited from interface org.apache.cassandra.io.util.ReaderFileProxy
channel, close, fileLength
-
Constructor Details
-
CompressedChunkReader
protected CompressedChunkReader(ChannelProxy channel, CompressionMetadata metadata, Supplier<Double> crcCheckChanceSupplier)
-
-
Method Details
-
forScan
-
getCrcCheckChance
public double getCrcCheckChance()Description copied from interface:ReaderFileProxyNeeded for tests. Returns the table's CRC check chance, which is only set for compressed tables.- Specified by:
getCrcCheckChancein interfaceReaderFileProxy- Overrides:
getCrcCheckChancein classAbstractReaderFileProxy
-
toString
- Overrides:
toStringin classAbstractReaderFileProxy
-
chunkSize
public int chunkSize()Description copied from interface:ChunkReaderBuffer size required for this rebufferer. Must be power of 2 if alignment is required.- Specified by:
chunkSizein interfaceChunkReader
-
preferredBufferType
Description copied from interface:ChunkReaderSpecifies type of buffer the caller should attempt to give. This is not guaranteed to be fulfilled.- Specified by:
preferredBufferTypein interfaceChunkReader
-
instantiateRebufferer
- Specified by:
instantiateRebuffererin interfaceRebuffererFactory
-