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
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.cassandra.db.partitions.AbstractBTreePartition
AbstractBTreePartition.Holder
-
-
Field Summary
Fields Modifier and Type Field Description protected AbstractBTreePartition.Holder
holder
protected TableMetadata
metadata
-
Fields inherited from class org.apache.cassandra.db.partitions.AbstractBTreePartition
EMPTY, HOLDER_UNSHARED_HEAP_SIZE, partitionKey
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ImmutableBTreePartition(TableMetadata metadata, DecoratedKey partitionKey, AbstractBTreePartition.Holder 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 AbstractBTreePartition.Holder
holder()
TableMetadata
metadata()
-
Methods inherited from class org.apache.cassandra.db.partitions.AbstractBTreePartition
build, build, build, columns, deletionInfo, getRow, hasRows, isEmpty, iterator, lastRow, partitionKey, partitionLevelDeletion, rowCount, staticRow, stats, toString, unfilteredIterator, unfilteredIterator, unfilteredIterator, unfilteredIterator, unsafeConstructHolder, unsafeGetEmptyHolder
-
-
-
-
Field Detail
-
holder
protected final AbstractBTreePartition.Holder 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, AbstractBTreePartition.Holder 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 AbstractBTreePartition.Holder holder()
- Specified by:
holder
in classAbstractBTreePartition
-
canHaveShadowedData
protected boolean canHaveShadowedData()
- Specified by:
canHaveShadowedData
in classAbstractBTreePartition
-
-