org.apache.cassandra.db

## Class UnfilteredDeserializer.OldFormatDeserializer

- java.lang.Object
- - org.apache.cassandra.db.UnfilteredDeserializer
  - - org.apache.cassandra.db.UnfilteredDeserializer.OldFormatDeserializer

- Enclosing class:
    UnfilteredDeserializer

      public static class UnfilteredDeserializer.OldFormatDeserializer
      extends UnfilteredDeserializer

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.cassandra.db.UnfilteredDeserializer

      `UnfilteredDeserializer.OldFormatDeserializer`

  - ### Field Summary

    - ### Fields inherited from class org.apache.cassandra.db.UnfilteredDeserializer

      `helper, in, metadata`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `bytesReadForUnconsumedData()` For the legacy layout deserializer, we have to deal with the fact that a row can span multiple index blocks and that the call to hasNext() reads the next element upfront.
    `void` | `clearState()` Clears any state in this deserializer.
    `int` | `compareNextTo(ClusteringBound bound)` Compare the provided bound to the next atom to read on disk.
    `boolean` | `hasNext()` Whether or not there is more atom to read.
    `boolean` | `nextIsRow()` Returns whether the next atom is a row or not.
    `boolean` | `nextIsStatic()` Returns whether the next atom is the static row or not.
    `Unfiltered` | `readNext()` Returns the next atom.
    `void` | `setSkipStatic()`
    `void` | `skipNext()` Skips the next atom.

    - ### Methods inherited from class org.apache.cassandra.db.UnfilteredDeserializer

      `create`

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

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

- - ### Method Detail

    - #### setSkipStatic

          public void setSkipStatic()

    - #### hasNext

          public boolean hasNext()
                          throws java.io.IOException

      Description copied from class: `UnfilteredDeserializer`
      Whether or not there is more atom to read.
      Specified by:
        `hasNext` in class `UnfilteredDeserializer`
      Throws:
        `java.io.IOException`

    - #### compareNextTo

          public int compareNextTo(ClusteringBound bound)
                            throws java.io.IOException

      Description copied from class: `UnfilteredDeserializer`
      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.
      Specified by:
        `compareNextTo` in class `UnfilteredDeserializer`
      Throws:
        `java.io.IOException`

    - #### nextIsRow

          public boolean nextIsRow()
                            throws java.io.IOException

      Description copied from class: `UnfilteredDeserializer`
      Returns whether the next atom is a row or not.
      Specified by:
        `nextIsRow` in class `UnfilteredDeserializer`
      Throws:
        `java.io.IOException`

    - #### nextIsStatic

          public boolean nextIsStatic()
                               throws java.io.IOException

      Description copied from class: `UnfilteredDeserializer`
      Returns whether the next atom is the static row or not.
      Specified by:
        `nextIsStatic` in class `UnfilteredDeserializer`
      Throws:
        `java.io.IOException`

    - #### readNext

          public Unfiltered readNext()
                              throws java.io.IOException

      Description copied from class: `UnfilteredDeserializer`
      Returns the next atom.
      Specified by:
        `readNext` in class `UnfilteredDeserializer`
      Throws:
        `java.io.IOException`

    - #### skipNext

          public void skipNext()
                        throws java.io.IOException

      Description copied from class: `UnfilteredDeserializer`
      Skips the next atom.
      Specified by:
        `skipNext` in class `UnfilteredDeserializer`
      Throws:
        `java.io.IOException`

    - #### bytesReadForUnconsumedData

          public long bytesReadForUnconsumedData()

      Description copied from class: `UnfilteredDeserializer`
      For the legacy layout deserializer, we have to deal with the fact that a row can span multiple index blocks and that the call to hasNext() reads the next element upfront. We must take that into account when we check in AbstractSSTableIterator if we're past the end of an index block boundary as that check expect to account for only consumed data (that is, if hasNext has been called and made us cross an index boundary but neither readNext() or skipNext() as yet been called, we shouldn't consider the index block boundary crossed yet). TODO: we don't care about this for the current file format because a row can never span multiple index blocks (further, hasNext() only just basically read 2 bytes from disk in that case). So once we drop backward compatibility with pre-3.0 sstable, we should remove this.
      Specified by:
        `bytesReadForUnconsumedData` in class `UnfilteredDeserializer`

    - #### clearState

          public void clearState()

      Description copied from class: `UnfilteredDeserializer`
      Clears any state in this deserializer.
      Specified by:
        `clearState` in class `UnfilteredDeserializer`

Copyright © 2018 The Apache Software Foundation