Package org.apache.cassandra.db
Class UnfilteredDeserializer
- java.lang.Object
-
- org.apache.cassandra.db.UnfilteredDeserializer
-
public class UnfilteredDeserializer extends java.lang.ObjectHelper class to deserialize Unfiltered object from disk efficiently. More precisely, this class is used by the low-level reader to ensure we don't do more work than necessary (i.e. we don't allocate/deserialize objects for things we don't care about).
-
-
Field Summary
Fields Modifier and Type Field Description protected DeserializationHelperhelperprotected DataInputPlusinprotected TableMetadatametadata
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearState()Clears any state in this deserializer.intcompareNextTo(ClusteringBound<?> bound)Compare the provided bound to the next atom to read on disk.static UnfilteredDeserializercreate(TableMetadata metadata, DataInputPlus in, SerializationHeader header, DeserializationHelper helper)booleanhasNext()Whether or not there is more atom to read.booleannextIsRow()Returns whether the next atom is a row or not.UnfilteredreadNext()Returns the next atom.voidskipNext()Skips the next atom.
-
-
-
Field Detail
-
metadata
protected final TableMetadata metadata
-
in
protected final DataInputPlus in
-
helper
protected final DeserializationHelper helper
-
-
Method Detail
-
create
public static UnfilteredDeserializer create(TableMetadata metadata, DataInputPlus in, SerializationHeader header, DeserializationHelper helper)
-
hasNext
public boolean hasNext() throws java.io.IOExceptionWhether or not there is more atom to read.- Throws:
java.io.IOException
-
compareNextTo
public int compareNextTo(ClusteringBound<?> bound) throws java.io.IOException
Compare the provided bound to the next atom to read on disk. This will not read/deserialize the whole atom but only what is necessary for the comparison. Whenever we know what to do with this atom (read it or skip it), readNext or skipNext should be called.- Throws:
java.io.IOException
-
nextIsRow
public boolean nextIsRow() throws java.io.IOExceptionReturns whether the next atom is a row or not.- Throws:
java.io.IOException
-
readNext
public Unfiltered readNext() throws java.io.IOException
Returns the next atom.- Throws:
java.io.IOException
-
clearState
public void clearState()
Clears any state in this deserializer.
-
skipNext
public void skipNext() throws java.io.IOExceptionSkips the next atom.- Throws:
java.io.IOException
-
-