Package org.apache.cassandra.db
Class UnfilteredDeserializer
- java.lang.Object
-
- org.apache.cassandra.db.UnfilteredDeserializer
-
public class UnfilteredDeserializer extends java.lang.Object
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
Fields Modifier and Type Field Description protected DeserializationHelper
helper
protected DataInputPlus
in
protected TableMetadata
metadata
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearState()
Clears any state in this deserializer.int
compareNextTo(ClusteringBound<?> bound)
Compare the provided bound to the next atom to read on disk.static UnfilteredDeserializer
create(TableMetadata metadata, DataInputPlus in, SerializationHeader header, DeserializationHelper helper)
boolean
hasNext()
Whether or not there is more atom to read.boolean
nextIsRow()
Returns whether the next atom is a row or not.Unfiltered
readNext()
Returns the next atom.void
skipNext()
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.IOException
Whether 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.IOException
Returns 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.IOException
Skips the next atom.- Throws:
java.io.IOException
-
-