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:
java.lang.AutoCloseable,ChunkReader,ReaderFileProxy,RebuffererFactory
- Direct Known Subclasses:
CompressedChunkReader.Mmap,CompressedChunkReader.Standard
public abstract class CompressedChunkReader extends AbstractReaderFileProxy implements ChunkReader
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCompressedChunkReader.Mmapstatic classCompressedChunkReader.Standard
-
Field Summary
-
Fields inherited from class org.apache.cassandra.io.util.AbstractReaderFileProxy
channel, fileLength
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedCompressedChunkReader(ChannelProxy channel, CompressionMetadata metadata)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intchunkSize()Buffer size required for this rebufferer.doublegetCrcCheckChance()Needed for tests.RebuffererinstantiateRebufferer()BufferTypepreferredBufferType()Specifies type of buffer the caller should attempt to give.java.lang.StringtoString()-
Methods inherited from class org.apache.cassandra.io.util.AbstractReaderFileProxy
channel, close, 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.ChunkReader
readChunk
-
Methods inherited from interface org.apache.cassandra.io.util.ReaderFileProxy
channel, close, fileLength
-
-
-
-
Constructor Detail
-
CompressedChunkReader
protected CompressedChunkReader(ChannelProxy channel, CompressionMetadata metadata)
-
-
Method Detail
-
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
public java.lang.String 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
public BufferType 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
public Rebufferer instantiateRebufferer()
- Specified by:
instantiateRebuffererin interfaceRebuffererFactory
-
-