public class Indexes extends java.lang.Object implements java.lang.Iterable<IndexMetadata>
Modifier and Type | Class and Description |
---|---|
static class |
Indexes.Builder |
Modifier and Type | Method and Description |
---|---|
static Indexes.Builder |
builder() |
boolean |
equals(java.lang.Object o) |
java.util.Collection<IndexMetadata> |
get(ColumnDefinition column)
Get the index associated with the specified column.
|
java.util.Optional<IndexMetadata> |
get(java.lang.String name)
Get the index with the specified name
|
static java.lang.String |
getAvailableIndexName(java.lang.String ksName,
java.lang.String cfName,
ColumnIdentifier columnName) |
boolean |
has(java.lang.String name)
Answer true if contains an index with the specified name.
|
int |
hashCode() |
boolean |
hasIndexFor(ColumnDefinition column)
Answer true if an index is associated with the specified column.
|
boolean |
isEmpty() |
java.util.Iterator<IndexMetadata> |
iterator() |
static Indexes |
none() |
Indexes |
replace(IndexMetadata index)
Creates a SecondaryIndexes instance which contains an updated index definition
|
int |
size() |
java.lang.String |
toString() |
Indexes |
with(IndexMetadata index)
Create a SecondaryIndexes instance with the provided index added
|
Indexes |
without(java.lang.String name)
Creates a SecondaryIndexes instance with the index with the provided name removed
|
public static Indexes.Builder builder()
public static Indexes none()
public java.util.Iterator<IndexMetadata> iterator()
iterator
in interface java.lang.Iterable<IndexMetadata>
public int size()
public boolean isEmpty()
public java.util.Optional<IndexMetadata> get(java.lang.String name)
name
- a non-qualified index nameOptional
if the named index is not found; a non-empty optional of IndexMetadata
otherwisepublic boolean has(java.lang.String name)
name
- a non-qualified index name.public java.util.Collection<IndexMetadata> get(ColumnDefinition column)
column
- a column definition for which an IndexMetadata
is being soughtOptional
if the named index is not found; a non-empty optional of IndexMetadata
otherwisepublic boolean hasIndexFor(ColumnDefinition column)
column
- public Indexes with(IndexMetadata index)
public Indexes without(java.lang.String name)
public Indexes replace(IndexMetadata index)
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 static java.lang.String getAvailableIndexName(java.lang.String ksName, java.lang.String cfName, ColumnIdentifier columnName)
Copyright © 2015 The Apache Software Foundation