Class ReactiveCollectionQueryIndexManager
java.lang.Object
com.couchbase.client.java.manager.query.ReactiveCollectionQueryIndexManager
Performs management operations on query indexes at the ReactiveCollection level.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono
<Void> Builds all currently deferred indexes on this collection.reactor.core.publisher.Mono
<Void> Builds all currently deferred indexes on this collection, with custom options.reactor.core.publisher.Mono
<Void> createIndex
(String indexName, Collection<String> fields) Creates a named query index on this collection.reactor.core.publisher.Mono
<Void> createIndex
(String indexName, Collection<String> fields, CreateQueryIndexOptions options) Creates a named query index with custom options, on this collection.reactor.core.publisher.Mono
<Void> Creates a primary query index on this collection.reactor.core.publisher.Mono
<Void> Creates a primary query index with custom options, on this collection.reactor.core.publisher.Mono
<Void> Drops a query index from this collection.reactor.core.publisher.Mono
<Void> dropIndex
(String indexName, DropQueryIndexOptions options) Drops a query index from this collection with custom options.reactor.core.publisher.Mono
<Void> Drops the primary index from this collection.reactor.core.publisher.Mono
<Void> Drops the primary index from this collection.reactor.core.publisher.Flux
<QueryIndex> Fetches all indexes on this collection.reactor.core.publisher.Flux
<QueryIndex> getAllIndexes
(GetAllQueryIndexesOptions options) Fetches all indexes from this collection with custom options.reactor.core.publisher.Mono
<Void> watchIndexes
(Collection<String> indexNames, Duration timeout) Watches/Polls indexes on this collection until they are online.reactor.core.publisher.Mono
<Void> watchIndexes
(Collection<String> indexNames, Duration timeout, WatchQueryIndexesOptions options) Watches/Polls indexes on this collection until they are online with custom options.
-
Constructor Details
-
ReactiveCollectionQueryIndexManager
@Internal public ReactiveCollectionQueryIndexManager(ReactorOps reactor, AsyncCollectionQueryIndexManager async) Creates a newReactiveCollectionQueryIndexManager
.This API is not intended to be called by the user directly, use
ReactiveCluster.queryIndexes()
instead.- Parameters:
async
- the async index manager.
-
-
Method Details
-
createIndex
Creates a named query index on this collection.- Parameters:
indexName
- the name of the query index.fields
- the collection of fields that are part of the index.- Throws:
IndexFailureException
- if creating the index failed (see reason for details).IndexExistsException
- if an index already exists with the given name on this collection.CouchbaseException
- if any other generic unhandled/unexpected errors.
-
createIndex
public reactor.core.publisher.Mono<Void> createIndex(String indexName, Collection<String> fields, CreateQueryIndexOptions options) Creates a named query index with custom options, on this collection.- Parameters:
indexName
- the name of the query index.fields
- the collection of fields that are part of the index.options
- the custom options to apply.- Throws:
IndexFailureException
- if creating the index failed (see reason for details).IndexExistsException
- if an index already exists with the given name on this collection.CouchbaseException
- if any other generic unhandled/unexpected errors.
-
createPrimaryIndex
Creates a primary query index on this collection.- Throws:
IndexFailureException
- if creating the index failed (see reason for details).IndexExistsException
- if an index already exists with the given name on this collection.CouchbaseException
- if any other generic unhandled/unexpected errors.
-
createPrimaryIndex
Creates a primary query index with custom options, on this collection.- Parameters:
options
- the custom options to apply.- Throws:
IndexFailureException
- if creating the index failed (see reason for details).IndexExistsException
- if an index already exists with the given name on this collection.CouchbaseException
- if any other generic unhandled/unexpected errors.
-
getAllIndexes
Fetches all indexes on this collection.- Returns:
- a (potentially empty)
Flux
of indexes or failed with an error. - Throws:
CouchbaseException
- if any other generic unhandled/unexpected errors.
-
getAllIndexes
Fetches all indexes from this collection with custom options.- Parameters:
options
- the custom options to apply.- Returns:
- a (potentially empty)
Flux
of indexes or failed with an error. - Throws:
CouchbaseException
- if any other generic unhandled/unexpected errors.
-
dropPrimaryIndex
Drops the primary index from this collection.- Throws:
IndexNotFoundException
- if the index does not exist.IndexFailureException
- if dropping the index failed (see reason for details).CouchbaseException
- if any other generic unhandled/unexpected errors.
-
dropPrimaryIndex
Drops the primary index from this collection.- Throws:
IndexNotFoundException
- if the index does not exist.IndexFailureException
- if dropping the index failed (see reason for details).CouchbaseException
- if any other generic unhandled/unexpected errors.
-
dropIndex
Drops a query index from this collection.- Parameters:
indexName
- the name of the index to drop.- Throws:
IndexNotFoundException
- if the index does not exist.IndexFailureException
- if dropping the index failed (see reason for details).CouchbaseException
- if any other generic unhandled/unexpected errors.
-
dropIndex
Drops a query index from this collection with custom options.- Parameters:
indexName
- the name of the index to drop.options
- the custom options to apply.- Throws:
IndexNotFoundException
- if the index does not exist.IndexFailureException
- if dropping the index failed (see reason for details).CouchbaseException
- if any other generic unhandled/unexpected errors.
-
buildDeferredIndexes
Builds all currently deferred indexes on this collection.- Throws:
CouchbaseException
- if any other generic unhandled/unexpected errors.
-
buildDeferredIndexes
Builds all currently deferred indexes on this collection, with custom options.- Parameters:
options
- the custom options to apply.- Throws:
CouchbaseException
- if any other generic unhandled/unexpected errors.
-
watchIndexes
public reactor.core.publisher.Mono<Void> watchIndexes(Collection<String> indexNames, Duration timeout) Watches/Polls indexes on this collection until they are online.- Parameters:
indexNames
- the names of the indexes to watch.timeout
- the maximum amount of time the indexes should be watched.- Throws:
CouchbaseException
- if any other generic unhandled/unexpected errors.
-
watchIndexes
public reactor.core.publisher.Mono<Void> watchIndexes(Collection<String> indexNames, Duration timeout, WatchQueryIndexesOptions options) Watches/Polls indexes on this collection until they are online with custom options.- Parameters:
indexNames
- the names of the indexes to watch.timeout
- the maximum amount of time the indexes should be watched.options
- the custom options to apply.- Throws:
CouchbaseException
- if any other generic unhandled/unexpected errors.
-