AtomDeserializer (apache-cassandra API)
Date: 2018-02-12

org.apache.cassandra.db

## Class AtomDeserializer

- java.lang.Object
- - org.apache.cassandra.db.AtomDeserializer

-     public class AtomDeserializer
      extends java.lang.Object

  Helper class to deserialize OnDiskAtom efficiently. More precisely, this class is used by the low-level readers (IndexedSliceReader and SSTableNamesIterator) 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).

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AtomDeserializer(CellNameType type, java.io.DataInput in, ColumnSerializer.Flag flag, int expireBefore, Version version)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compareNextTo(Composite composite)` Compare the provided composite to the next atom to read on disk.
    `boolean` | `hasNext()` Whether or not there is more atom to read.
    `boolean` | `hasUnprocessed()` Whether or not some atom has been read but not processed (neither readNext() nor skipNext() has been called for that atom) yet.
    `boolean` | `nextIsRangeTombstone()` Returns whether the next atom is a range tombstone or not.
    `OnDiskAtom` | `readNext()` Returns the next atom.
    `void` | `skipNext()` Skips the next atom.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AtomDeserializer

          public AtomDeserializer(CellNameType type,
                                  java.io.DataInput in,
                                  ColumnSerializer.Flag flag,
                                  int expireBefore,
                                  Version version)

  - ### Method Detail

    - #### hasNext

          public boolean hasNext()
                          throws java.io.IOException

      Whether or not there is more atom to read.
      Throws:
        `java.io.IOException`

    - #### hasUnprocessed

          public boolean hasUnprocessed()
                                 throws java.io.IOException

      Whether or not some atom has been read but not processed (neither readNext() nor skipNext() has been called for that atom) yet.
      Throws:
        `java.io.IOException`

    - #### compareNextTo

          public int compareNextTo(Composite composite)
                            throws java.io.IOException

      Compare the provided composite 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`

    - #### nextIsRangeTombstone

          public boolean nextIsRangeTombstone()
                                       throws java.io.IOException

      Returns whether the next atom is a range tombstone or not. Please note that this should only be called after compareNextTo() has been called.
      Throws:
        `java.io.IOException`

    - #### readNext

          public OnDiskAtom readNext()
                              throws java.io.IOException

      Returns the next atom.
      Throws:
        `java.io.IOException`

    - #### skipNext

          public void skipNext()
                        throws java.io.IOException

      Skips the next atom.
      Throws:
        `java.io.IOException`

Copyright © 2018 The Apache Software Foundation