Partition (apache-cassandra API)
Date: 2018-02-14

org.apache.cassandra.db.partitions

## Interface Partition

- All Known Subinterfaces:
    CachedPartition
  All Known Implementing Classes:
    AbstractBTreePartition, AtomicBTreePartition, CachedBTreePartition, FilteredPartition, ImmutableBTreePartition, PartitionUpdate

      public interface Partition

  In-memory representation of a Partition. Note that most of the storage engine works through iterators (UnfilteredPartitionIterator) to avoid "materializing" a full partition/query response in memory as much as possible, and so Partition objects should be use as sparingly as possible. There is a couple of cases where we do need to represent partition in-memory (memtables and row cache).

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `PartitionColumns` | `columns()`
    `Row` | `getRow(Clustering clustering)` Returns the row corresponding to the provided clustering, or null if there is not such row.
    `boolean` | `isEmpty()` Whether the partition object has no informations at all, including any deletion informations.
    `CFMetaData` | `metadata()`
    `DecoratedKey` | `partitionKey()`
    `DeletionTime` | `partitionLevelDeletion()`
    `SearchIterator<Clustering,Row>` | `searchIterator(ColumnFilter columns, boolean reversed)` Returns an iterator that allows to search specific rows efficiently.
    `EncodingStats` | `stats()`
    `UnfilteredRowIterator` | `unfilteredIterator()` Returns an UnfilteredRowIterator over all the rows/RT contained by this partition.
    `UnfilteredRowIterator` | `unfilteredIterator(ColumnFilter columns, Slices slices, boolean reversed)` Returns an UnfilteredRowIterator over the rows/RT contained by this partition selected by the provided slices.

- - ### Method Detail

    - #### metadata

          CFMetaData metadata()

    - #### partitionKey

          DecoratedKey partitionKey()

    - #### partitionLevelDeletion

          DeletionTime partitionLevelDeletion()

    - #### columns

          PartitionColumns columns()

    - #### stats

          EncodingStats stats()

    - #### isEmpty

          boolean isEmpty()

      Whether the partition object has no informations at all, including any deletion informations.

    - #### getRow

          Row getRow(Clustering clustering)

      Returns the row corresponding to the provided clustering, or null if there is not such row.

    - #### searchIterator

          SearchIterator<Clustering,Row> searchIterator(ColumnFilter columns,
                                                        boolean reversed)

      Returns an iterator that allows to search specific rows efficiently.

    - #### unfilteredIterator

          UnfilteredRowIterator unfilteredIterator()

      Returns an UnfilteredRowIterator over all the rows/RT contained by this partition.

    - #### unfilteredIterator

          UnfilteredRowIterator unfilteredIterator(ColumnFilter columns,
                                                   Slices slices,
                                                   boolean reversed)

      Returns an UnfilteredRowIterator over the rows/RT contained by this partition selected by the provided slices.

Copyright © 2018 The Apache Software Foundation