Package org.apache.cassandra.db
Class UnfilteredDeserializer
java.lang.Object
org.apache.cassandra.db.UnfilteredDeserializer
Helper 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
FieldsModifier and TypeFieldDescriptionprotected final DeserializationHelperprotected final DataInputPlusprotected final TableMetadata -
Method Summary
Modifier and TypeMethodDescriptionvoidClears 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.booleanReturns whether the next atom is a row or not.readNext()Returns the next atom.voidskipNext()Skips the next atom.
-
Field Details
-
metadata
-
in
-
helper
-
-
Method Details
-
create
public static UnfilteredDeserializer create(TableMetadata metadata, DataInputPlus in, SerializationHeader header, DeserializationHelper helper) -
hasNext
Whether or not there is more atom to read.- Throws:
IOException
-
compareNextTo
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:
IOException
-
nextIsRow
Returns whether the next atom is a row or not.- Throws:
IOException
-
readNext
Returns the next atom.- Throws:
IOException
-
clearState
public void clearState()Clears any state in this deserializer. -
skipNext
Skips the next atom.- Throws:
IOException
-