Package org.apache.cassandra.hints
Class CompressedChecksummedDataInput
- java.lang.Object
-
- java.io.InputStream
-
- org.apache.cassandra.io.util.DataInputPlus.DataInputStreamPlus
-
- org.apache.cassandra.io.util.RebufferingInputStream
-
- org.apache.cassandra.hints.ChecksummedDataInput
-
- org.apache.cassandra.hints.CompressedChecksummedDataInput
-
- All Implemented Interfaces:
java.io.Closeable
,java.io.DataInput
,java.lang.AutoCloseable
,DataInputPlus
public final class CompressedChecksummedDataInput extends ChecksummedDataInput
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.cassandra.io.util.DataInputPlus
DataInputPlus.DataInputStreamPlus
-
-
Field Summary
-
Fields inherited from class org.apache.cassandra.hints.ChecksummedDataInput
bufferOffset, channel
-
Fields inherited from class org.apache.cassandra.io.util.RebufferingInputStream
buffer
-
-
Constructor Summary
Constructors Constructor Description CompressedChecksummedDataInput(ChannelProxy channel, ICompressor compressor, long filePosition)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
InputPosition
getSeekPosition()
Return a seekable representation of the current position.long
getSourcePosition()
Returns the position in the source file, which is different for getPosition() for compressed/encrypted files and may be imprecise.boolean
isEOF()
Since an entire block of compressed data is read off of disk, not just a hint at a time, we don't report EOF until the decompressed data has also been read completelyprotected void
readBuffer()
void
seek(InputPosition p)
static ChecksummedDataInput
upgradeInput(ChecksummedDataInput input, ICompressor compressor)
-
Methods inherited from class org.apache.cassandra.hints.ChecksummedDataInput
bytesPastLimit, checkCrc, checkLimit, getChannel, getPath, getPosition, limit, open, read, readFully, reBuffer, resetCrc, resetLimit, tryUncacheRead
-
Methods inherited from class org.apache.cassandra.io.util.RebufferingInputStream
read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readPrimitiveSlowly, readShort, readUnsignedByte, readUnsignedShort, readUnsignedVInt, readUnsignedVInt32, readUTF, readVInt, readVInt32, skipBytes
-
Methods inherited from class java.io.InputStream
available, mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, transferTo
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.cassandra.io.util.DataInputPlus
skipBytesFully
-
-
-
-
Constructor Detail
-
CompressedChecksummedDataInput
public CompressedChecksummedDataInput(ChannelProxy channel, ICompressor compressor, long filePosition)
-
-
Method Detail
-
isEOF
public boolean isEOF()
Since an entire block of compressed data is read off of disk, not just a hint at a time, we don't report EOF until the decompressed data has also been read completely- Overrides:
isEOF
in classChecksummedDataInput
-
getSourcePosition
public long getSourcePosition()
Description copied from class:ChecksummedDataInput
Returns the position in the source file, which is different for getPosition() for compressed/encrypted files and may be imprecise.- Overrides:
getSourcePosition
in classChecksummedDataInput
-
getSeekPosition
public InputPosition getSeekPosition()
Description copied from class:ChecksummedDataInput
Return a seekable representation of the current position. For compressed files this is chunk position in file and offset within chunk.- Overrides:
getSeekPosition
in classChecksummedDataInput
-
seek
public void seek(InputPosition p)
- Overrides:
seek
in classChecksummedDataInput
-
readBuffer
protected void readBuffer()
- Overrides:
readBuffer
in classChecksummedDataInput
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classChecksummedDataInput
-
upgradeInput
public static ChecksummedDataInput upgradeInput(ChecksummedDataInput input, ICompressor compressor)
-
-