Package org.apache.cassandra.db.virtual
Class AbstractVirtualTable
- java.lang.Object
-
- org.apache.cassandra.db.virtual.AbstractVirtualTable
-
- All Implemented Interfaces:
VirtualTable
- Direct Known Subclasses:
AbstractMutableVirtualTable,AbstractVirtualTable.SimpleTable,BatchMetricsTable,InternodeInboundTable,InternodeOutboundTable,StreamingVirtualTable
public abstract class AbstractVirtualTable extends java.lang.Object implements VirtualTable
An abstract virtual table implementation that builds the resultset on demand.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAbstractVirtualTable.AbstractDataSetAn abstract, map-backed DataSet implementation.static interfaceAbstractVirtualTable.DataSetstatic interfaceAbstractVirtualTable.Partitionstatic classAbstractVirtualTable.SimpleTable
-
Field Summary
Fields Modifier and Type Field Description protected TableMetadatametadata
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractVirtualTable(TableMetadata metadata)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidapply(PartitionUpdate update)Applies the specified update, if supported.abstract AbstractVirtualTable.DataSetdata()Provide aAbstractVirtualTable.DataSetthat is contains all of the virtual table's data.AbstractVirtualTable.DataSetdata(DecoratedKey partitionKey)Provide aAbstractVirtualTable.DataSetthat is potentially restricted to the provided partition - but is allowed to contain other partitions.TableMetadatametadata()Returns the view metadata.UnfilteredPartitionIteratorselect(DataRange dataRange, ColumnFilter columnFilter)Selects the rows from a range of partitions.UnfilteredPartitionIteratorselect(DecoratedKey partitionKey, ClusteringIndexFilter clusteringIndexFilter, ColumnFilter columnFilter)Selects the rows from a single partition.java.lang.StringtoString()voidtruncate()Truncates data from the underlying source, if supported.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.cassandra.db.virtual.VirtualTable
name
-
-
-
-
Field Detail
-
metadata
protected final TableMetadata metadata
-
-
Constructor Detail
-
AbstractVirtualTable
protected AbstractVirtualTable(TableMetadata metadata)
-
-
Method Detail
-
metadata
public TableMetadata metadata()
Description copied from interface:VirtualTableReturns the view metadata.- Specified by:
metadatain interfaceVirtualTable- Returns:
- the view metadata.
-
data
public abstract AbstractVirtualTable.DataSet data()
Provide aAbstractVirtualTable.DataSetthat is contains all of the virtual table's data.
-
data
public AbstractVirtualTable.DataSet data(DecoratedKey partitionKey)
Provide aAbstractVirtualTable.DataSetthat is potentially restricted to the provided partition - but is allowed to contain other partitions.
-
select
public final UnfilteredPartitionIterator select(DecoratedKey partitionKey, ClusteringIndexFilter clusteringIndexFilter, ColumnFilter columnFilter)
Description copied from interface:VirtualTableSelects the rows from a single partition.- Specified by:
selectin interfaceVirtualTable- Parameters:
partitionKey- the partition keyclusteringIndexFilter- the clustering columns to selectedcolumnFilter- the selected columns- Returns:
- the rows corresponding to the requested data.
-
select
public final UnfilteredPartitionIterator select(DataRange dataRange, ColumnFilter columnFilter)
Description copied from interface:VirtualTableSelects the rows from a range of partitions.- Specified by:
selectin interfaceVirtualTable- Parameters:
dataRange- the range of data to retrievecolumnFilter- the selected columns- Returns:
- the rows corresponding to the requested data.
-
apply
public void apply(PartitionUpdate update)
Description copied from interface:VirtualTableApplies the specified update, if supported.- Specified by:
applyin interfaceVirtualTable- Parameters:
update- the update to apply
-
truncate
public void truncate()
Description copied from interface:VirtualTableTruncates data from the underlying source, if supported.- Specified by:
truncatein interfaceVirtualTable
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-