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.Optional<IndexMetadata> |
get(java.lang.String name)
Get the index with the specified name
|
java.util.Optional<IndexMetadata> |
get(java.util.UUID id)
Get the index with the specified id
|
static java.lang.String |
getAvailableIndexName(java.lang.String ksName,
java.lang.String cfName,
java.lang.String indexNameRoot) |
boolean |
has(java.lang.String name)
Answer true if contains an index with the specified name.
|
boolean |
has(java.util.UUID id)
Answer true if contains an index with the specified id.
|
int |
hashCode() |
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.Optional<IndexMetadata> get(java.util.UUID id)
name
- a UUID which identifies an indexOptional
if no index with the specified id is found; a non-empty optional of
IndexMetadata
otherwisepublic boolean has(java.util.UUID id)
name
- a UUID which identifies an index.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, java.lang.String indexNameRoot)
Copyright © 2018 The Apache Software Foundation