public final class TableMetadata
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
TableMetadata.Builder |
static class |
TableMetadata.Flag |
static class |
TableMetadata.Kind |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COMPACT_STORAGE_HALT_MESSAGE |
ColumnMetadata |
compactValueColumn |
ClusteringComparator |
comparator |
com.google.common.collect.ImmutableMap<java.nio.ByteBuffer,DroppedColumn> |
droppedColumns |
com.google.common.collect.ImmutableSet<TableMetadata.Flag> |
flags |
TableId |
id |
Indexes |
indexes |
java.lang.String |
keyspace |
TableMetadata.Kind |
kind |
java.lang.String |
name |
TableParams |
params |
IPartitioner |
partitioner |
AbstractType<?> |
partitionKeyType |
DataResource |
resource |
Triggers |
triggers |
Modifier and Type | Method and Description |
---|---|
java.util.Iterator<ColumnMetadata> |
allColumnsInSelectOrder() |
static TableMetadata.Builder |
builder(java.lang.String keyspace,
java.lang.String table) |
static TableMetadata.Builder |
builder(java.lang.String keyspace,
java.lang.String table,
TableId id) |
com.google.common.collect.ImmutableList<ColumnMetadata> |
clusteringColumns() |
AbstractType<?> |
columnDefinitionNameComparator(ColumnMetadata.Kind kind) |
com.google.common.collect.ImmutableCollection<ColumnMetadata> |
columns() |
boolean |
enforceStrictLiveness()
A table with strict liveness filters/ignores rows without PK liveness info,
effectively tying the row liveness to its primary key liveness.
|
boolean |
equals(java.lang.Object o) |
ColumnMetadata |
getColumn(java.nio.ByteBuffer name) |
ColumnMetadata |
getColumn(ColumnIdentifier name)
Returns the ColumnMetadata for
name . |
ColumnMetadata |
getDroppedColumn(java.nio.ByteBuffer name) |
ColumnMetadata |
getDroppedColumn(java.nio.ByteBuffer name,
boolean isStatic)
Returns a "fake" ColumnMetadata corresponding to the dropped column
name
of null if there is no such dropped column. |
int |
hashCode() |
boolean |
hasStaticColumns() |
java.util.Optional<java.lang.String> |
indexName() |
java.lang.String |
indexTableName(IndexMetadata info)
Generate a table name for an index corresponding to the given column.
|
boolean |
isCompactTable() |
boolean |
isCompound() |
boolean |
isCounter() |
boolean |
isCQLTable() |
boolean |
isDense() |
boolean |
isIndex() |
boolean |
isStaticCompactTable() |
boolean |
isSuper() |
boolean |
isView() |
boolean |
isVirtual() |
static TableMetadata |
minimal(java.lang.String keyspace,
java.lang.String name)
There is a couple of places in the code where we need a TableMetadata object and don't have one readily available
and know that only the keyspace and name matter.
|
ClusteringComparator |
partitionKeyAsClusteringComparator() |
com.google.common.collect.ImmutableList<ColumnMetadata> |
partitionKeyColumns() |
java.lang.Iterable<ColumnMetadata> |
primaryKeyColumns() |
RegularAndStaticColumns |
regularAndStaticColumns() |
Columns |
regularColumns() |
Columns |
staticColumns() |
java.lang.String |
toDebugString() |
java.lang.String |
toString() |
TableMetadata.Builder |
unbuild() |
TableMetadata |
updateIndexTableMetadata(TableParams baseTableParams) |
void |
validate() |
TableMetadata |
withSwapped(Indexes indexes) |
TableMetadata |
withSwapped(TableParams params) |
TableMetadata |
withSwapped(Triggers triggers) |
TableMetadata |
withUpdatedUserType(UserType udt) |
public static final java.lang.String COMPACT_STORAGE_HALT_MESSAGE
public final java.lang.String keyspace
public final java.lang.String name
public final TableId id
public final IPartitioner partitioner
public final TableMetadata.Kind kind
public final TableParams params
public final com.google.common.collect.ImmutableSet<TableMetadata.Flag> flags
public final com.google.common.collect.ImmutableMap<java.nio.ByteBuffer,DroppedColumn> droppedColumns
public final Indexes indexes
public final Triggers triggers
public final AbstractType<?> partitionKeyType
public final ClusteringComparator comparator
public final ColumnMetadata compactValueColumn
public final DataResource resource
public static TableMetadata.Builder builder(java.lang.String keyspace, java.lang.String table)
public static TableMetadata.Builder builder(java.lang.String keyspace, java.lang.String table, TableId id)
public TableMetadata.Builder unbuild()
public boolean isIndex()
public TableMetadata withSwapped(TableParams params)
public TableMetadata withSwapped(Triggers triggers)
public TableMetadata withSwapped(Indexes indexes)
public boolean isView()
public boolean isVirtual()
public java.util.Optional<java.lang.String> indexName()
public boolean isDense()
public boolean isCompound()
public boolean isSuper()
public boolean isCounter()
public boolean isCQLTable()
public boolean isCompactTable()
public boolean isStaticCompactTable()
public com.google.common.collect.ImmutableCollection<ColumnMetadata> columns()
public java.lang.Iterable<ColumnMetadata> primaryKeyColumns()
public com.google.common.collect.ImmutableList<ColumnMetadata> partitionKeyColumns()
public com.google.common.collect.ImmutableList<ColumnMetadata> clusteringColumns()
public RegularAndStaticColumns regularAndStaticColumns()
public Columns regularColumns()
public Columns staticColumns()
public java.util.Iterator<ColumnMetadata> allColumnsInSelectOrder()
public ColumnMetadata getColumn(ColumnIdentifier name)
name
.public ColumnMetadata getColumn(java.nio.ByteBuffer name)
public ColumnMetadata getDroppedColumn(java.nio.ByteBuffer name)
public ColumnMetadata getDroppedColumn(java.nio.ByteBuffer name, boolean isStatic)
name
of null
if there is no such dropped column.name
- - the column nameisStatic
- - whether the column was a static column, if knownpublic boolean hasStaticColumns()
public void validate()
public ClusteringComparator partitionKeyAsClusteringComparator()
public AbstractType<?> columnDefinitionNameComparator(ColumnMetadata.Kind kind)
public java.lang.String indexTableName(IndexMetadata info)
info
- A definition of the column with indexpublic static TableMetadata minimal(java.lang.String keyspace, java.lang.String name)
public TableMetadata updateIndexTableMetadata(TableParams baseTableParams)
public TableMetadata withUpdatedUserType(UserType udt)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toDebugString()
public boolean enforceStrictLiveness()
Copyright © 2009-2019 The Apache Software Foundation