SSTableIdentityIterator (apache-cassandra API)
Date: 2014-10-21

org.apache.cassandra.io.sstable

## Class SSTableIdentityIterator

- java.lang.Object
- - org.apache.cassandra.io.sstable.SSTableIdentityIterator

- All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, java.lang.Comparable<SSTableIdentityIterator>, java.util.Iterator<OnDiskAtom>, OnDiskAtomIterator, CloseableIterator<OnDiskAtom>

      public class SSTableIdentityIterator
      extends java.lang.Object
      implements java.lang.Comparable<SSTableIdentityIterator>, OnDiskAtomIterator

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `long` | `dataSize`
    `ColumnSerializer.Flag` | `flag`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SSTableIdentityIterator(SSTableReader sstable, RandomAccessReader file, DecoratedKey key, long dataSize)` Used to iterate through the columns of a row.
    `SSTableIdentityIterator(SSTableReader sstable, RandomAccessReader file, DecoratedKey key, long dataSize, boolean checkData)` Used to iterate through the columns of a row.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` clean up any open resources
    `int` | `compareTo(SSTableIdentityIterator o)`
    `ColumnFamily` | `getColumnFamily()`
    `DecoratedKey` | `getKey()`
    `java.lang.String` | `getPath()`
    `boolean` | `hasNext()`
    `OnDiskAtom` | `next()`
    `void` | `remove()`

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

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

- - ### Field Detail

    - #### dataSize

          public final long dataSize

    - #### flag

          public final ColumnSerializer.Flag flag

  - ### Constructor Detail

    - #### SSTableIdentityIterator

          public SSTableIdentityIterator(SSTableReader sstable,
                                 RandomAccessReader file,
                                 DecoratedKey key,
                                 long dataSize)

      Used to iterate through the columns of a row.
      Parameters:
        `sstable` - SSTable we are reading ffrom.
        `file` - Reading using this file.
        `key` - Key of this row.
        `dataSize` - length of row data

    - #### SSTableIdentityIterator

          public SSTableIdentityIterator(SSTableReader sstable,
                                 RandomAccessReader file,
                                 DecoratedKey key,
                                 long dataSize,
                                 boolean checkData)

      Used to iterate through the columns of a row.
      Parameters:
        `sstable` - SSTable we are reading ffrom.
        `file` - Reading using this file.
        `key` - Key of this row.
        `dataSize` - length of row data
        `checkData` - if true, do its best to deserialize and check the coherence of row data

  - ### Method Detail

    - #### getKey

          public DecoratedKey getKey()

      Specified by:
        `getKey` in interface `OnDiskAtomIterator`
      Returns:
        the current row key

    - #### getColumnFamily

          public ColumnFamily getColumnFamily()

      Specified by:
        `getColumnFamily` in interface `OnDiskAtomIterator`
      Returns:
        A ColumnFamily holding metadata for the row being iterated. Do not modify this CF. Whether it is empty or not is implementation-dependent.

    - #### hasNext

          public boolean hasNext()

      Specified by:
        `hasNext` in interface `java.util.Iterator<OnDiskAtom>`

    - #### next

          public OnDiskAtom next()

      Specified by:
        `next` in interface `java.util.Iterator<OnDiskAtom>`

    - #### remove

          public void remove()

      Specified by:
        `remove` in interface `java.util.Iterator<OnDiskAtom>`

    - #### close

          public void close()

      Description copied from interface: `OnDiskAtomIterator`
      clean up any open resources
      Specified by:
        `close` in interface `java.io.Closeable`
      Specified by:
        `close` in interface `java.lang.AutoCloseable`
      Specified by:
        `close` in interface `OnDiskAtomIterator`

    - #### getPath

          public java.lang.String getPath()

    - #### compareTo

          public int compareTo(SSTableIdentityIterator o)

      Specified by:
        `compareTo` in interface `java.lang.Comparable<SSTableIdentityIterator>`

Copyright © 2014 The Apache Software Foundation