Class ImmutableBTreePartition

java.lang.Object
org.apache.cassandra.db.partitions.AbstractBTreePartition
org.apache.cassandra.db.partitions.ImmutableBTreePartition
All Implemented Interfaces:
Iterable<Row>, Partition
Direct Known Subclasses:
CachedBTreePartition, FilteredPartition

public class ImmutableBTreePartition extends AbstractBTreePartition
  • Field Details

  • Constructor Details

  • Method Details

    • 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.
    • metadata

      public TableMetadata metadata()
      Specified by:
      metadata in interface Partition
      Specified by:
      metadata in class AbstractBTreePartition
    • holder

      protected BTreePartitionData holder()
      Specified by:
      holder in class AbstractBTreePartition
    • canHaveShadowedData

      protected boolean canHaveShadowedData()
      Specified by:
      canHaveShadowedData in class AbstractBTreePartition