org.apache.cassandra.db.partitions

## Class ImmutableBTreePartition

- java.lang.Object
- - org.apache.cassandra.db.partitions.AbstractBTreePartition
  - - org.apache.cassandra.db.partitions.ImmutableBTreePartition

- All Implemented Interfaces:
    java.lang.Iterable<Row>, Partition
  Direct Known Subclasses:
    CachedBTreePartition, FilteredPartition

      public class ImmutableBTreePartition
      extends AbstractBTreePartition

- - ### Nested Class Summary

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

      `AbstractBTreePartition.Holder, AbstractBTreePartition.SlicesIterator`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected AbstractBTreePartition.Holder` | `holder`

    - ### Fields inherited from class org.apache.cassandra.db.partitions.AbstractBTreePartition

      `EMPTY, metadata, partitionKey`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `ImmutableBTreePartition(CFMetaData metadata, DecoratedKey partitionKey, AbstractBTreePartition.Holder holder)`
    `` | `ImmutableBTreePartition(CFMetaData metadata, DecoratedKey partitionKey, PartitionColumns columns, Row staticRow, java.lang.Object[] tree, DeletionInfo deletionInfo, EncodingStats stats)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected boolean` | `canHaveShadowedData()`
    `static ImmutableBTreePartition` | `create(UnfilteredRowIterator iterator)` Creates an `ImmutableBTreePartition` holding all the data of the provided iterator.
    `static ImmutableBTreePartition` | `create(UnfilteredRowIterator iterator, boolean ordered)` Creates an `ImmutableBTreePartition` holding all the data of the provided iterator.
    `static ImmutableBTreePartition` | `create(UnfilteredRowIterator iterator, int initialRowCapacity)` Creates an `ImmutableBTreePartition` holding all the data of the provided iterator.
    `static ImmutableBTreePartition` | `create(UnfilteredRowIterator iterator, int initialRowCapacity, boolean ordered)` Creates an `ImmutableBTreePartition` holding all the data of the provided iterator.
    `protected AbstractBTreePartition.Holder` | `holder()`

    - ### Methods inherited from class org.apache.cassandra.db.partitions.AbstractBTreePartition

      `build, build, build, columns, deletionInfo, getRow, hasRows, isEmpty, iterator, lastRow, metadata, partitionKey, partitionLevelDeletion, rowCount, searchIterator, staticRow, stats, toString, unfilteredIterator, unfilteredIterator, unfilteredIterator`

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

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

    - ### Methods inherited from interface java.lang.Iterable

      `forEach, spliterator`

- - ### Field Detail

    - #### holder

          protected final AbstractBTreePartition.Holder holder

  - ### Constructor Detail

    - #### ImmutableBTreePartition

          public ImmutableBTreePartition(CFMetaData metadata,
                                         DecoratedKey partitionKey,
                                         PartitionColumns columns,
                                         Row staticRow,
                                         java.lang.Object[] tree,
                                         DeletionInfo deletionInfo,
                                         EncodingStats stats)

    - #### ImmutableBTreePartition

          protected ImmutableBTreePartition(CFMetaData metadata,
                                            DecoratedKey partitionKey,
                                            AbstractBTreePartition.Holder holder)

  - ### Method Detail

    - #### create

          public static ImmutableBTreePartition create(UnfilteredRowIterator iterator)

      Creates an `ImmutableBTreePartition` holding all the data of the provided iterator. Warning: Note that this method does not close the provided iterator and it is up to the caller to do so.
      Parameters:
        `iterator` - the iterator to gather in memory.
      Returns:
        the created partition.

    - #### create

          public static ImmutableBTreePartition create(UnfilteredRowIterator iterator,
                                                       boolean ordered)

      Creates an `ImmutableBTreePartition` holding all the data of the provided iterator. Warning: Note that this method does not close the provided iterator and it is up to the caller to do so.
      Parameters:
        `iterator` - the iterator to gather in memory.
        `ordered` - `true` if the iterator will return the rows in order, `false` otherwise.
      Returns:
        the created partition.

    - #### create

          public static ImmutableBTreePartition create(UnfilteredRowIterator iterator,
                                                       int initialRowCapacity)

      Creates an `ImmutableBTreePartition` holding all the data of the provided iterator. Warning: Note that this method does not close the provided iterator and it is up to the caller to do so.
      Parameters:
        `iterator` - the iterator to gather in memory.
        `initialRowCapacity` - sizing hint (in rows) to use for the created partition. It should ideally correspond or be a good estimation of the number or rows in `iterator`.
      Returns:
        the created partition.

    - #### create

          public static ImmutableBTreePartition create(UnfilteredRowIterator iterator,
                                                       int initialRowCapacity,
                                                       boolean ordered)

      Creates an `ImmutableBTreePartition` holding all the data of the provided iterator. Warning: Note that this method does not close the provided iterator and it is up to the caller to do so.
      Parameters:
        `iterator` - the iterator to gather in memory.
        `initialRowCapacity` - sizing hint (in rows) to use for the created partition. It should ideally correspond or be a good estimation of the number or rows in `iterator`.
        `ordered` - `true` if the iterator will return the rows in order, `false` otherwise.
      Returns:
        the created partition.

    - #### holder

          protected AbstractBTreePartition.Holder holder()

      Specified by:
        `holder` in class `AbstractBTreePartition`

    - #### canHaveShadowedData

          protected boolean canHaveShadowedData()

      Specified by:
        `canHaveShadowedData` in class `AbstractBTreePartition`

Copyright © 2018 The Apache Software Foundation