Class ImmutableBTreePartition
- java.lang.Object
-
- org.apache.cassandra.db.partitions.AbstractBTreePartition
-
- org.apache.cassandra.db.partitions.ImmutableBTreePartition
-
- Direct Known Subclasses:
CachedBTreePartition
,FilteredPartition
public class ImmutableBTreePartition extends AbstractBTreePartition
-
-
Field Summary
Fields Modifier and Type Field Description protected BTreePartitionData
holder
protected TableMetadata
metadata
-
Fields inherited from class org.apache.cassandra.db.partitions.AbstractBTreePartition
partitionKey
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ImmutableBTreePartition(TableMetadata metadata, DecoratedKey partitionKey, BTreePartitionData holder)
ImmutableBTreePartition(TableMetadata metadata, DecoratedKey partitionKey, RegularAndStaticColumns 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 Description protected boolean
canHaveShadowedData()
static ImmutableBTreePartition
create(UnfilteredRowIterator iterator)
Creates anImmutableBTreePartition
holding all the data of the provided iterator.static ImmutableBTreePartition
create(UnfilteredRowIterator iterator, boolean ordered)
Creates anImmutableBTreePartition
holding all the data of the provided iterator.static ImmutableBTreePartition
create(UnfilteredRowIterator iterator, int initialRowCapacity)
Creates anImmutableBTreePartition
holding all the data of the provided iterator.static ImmutableBTreePartition
create(UnfilteredRowIterator iterator, int initialRowCapacity, boolean ordered)
Creates anImmutableBTreePartition
holding all the data of the provided iterator.protected BTreePartitionData
holder()
TableMetadata
metadata()
-
Methods inherited from class org.apache.cassandra.db.partitions.AbstractBTreePartition
build, build, build, columns, deletionInfo, equals, getRow, hasRows, isEmpty, iterator, lastRow, partitionKey, partitionLevelDeletion, rowCount, staticRow, stats, toString, toString, unfilteredIterator, unfilteredIterator, unfilteredIterator, unfilteredIterator
-
-
-
-
Field Detail
-
holder
protected final BTreePartitionData holder
-
metadata
protected final TableMetadata metadata
-
-
Constructor Detail
-
ImmutableBTreePartition
public ImmutableBTreePartition(TableMetadata metadata, DecoratedKey partitionKey, RegularAndStaticColumns columns, Row staticRow, java.lang.Object[] tree, DeletionInfo deletionInfo, EncodingStats stats)
-
ImmutableBTreePartition
protected ImmutableBTreePartition(TableMetadata metadata, DecoratedKey partitionKey, BTreePartitionData holder)
-
-
Method Detail
-
create
public static ImmutableBTreePartition create(UnfilteredRowIterator iterator)
Creates anImmutableBTreePartition
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 anImmutableBTreePartition
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 anImmutableBTreePartition
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 initerator
.- Returns:
- the created partition.
-
create
public static ImmutableBTreePartition create(UnfilteredRowIterator iterator, int initialRowCapacity, boolean ordered)
Creates anImmutableBTreePartition
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 initerator
.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 interfacePartition
- Specified by:
metadata
in classAbstractBTreePartition
-
holder
protected BTreePartitionData holder()
- Specified by:
holder
in classAbstractBTreePartition
-
canHaveShadowedData
protected boolean canHaveShadowedData()
- Specified by:
canHaveShadowedData
in classAbstractBTreePartition
-
-