Module spring.data.mongodb
Class DefaultReactiveIndexOperations
java.lang.Object
org.springframework.data.mongodb.core.DefaultReactiveIndexOperations
- All Implemented Interfaces:
ReactiveIndexOperations
Default implementation of
ReactiveIndexOperations.- Since:
- 2.0
- Author:
- Mark Paluch, Christoph Strobl
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultReactiveIndexOperations(ReactiveMongoOperations mongoOperations, String collectionName, QueryMapper queryMapper) Creates a newDefaultReactiveIndexOperations.DefaultReactiveIndexOperations(ReactiveMongoOperations mongoOperations, String collectionName, QueryMapper queryMapper, Class<?> type) Creates a newDefaultReactiveIndexOperations. -
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<Void>alterIndex(String name, IndexOptions options) Alters the index with given name.reactor.core.publisher.Mono<Void>Drops all indices from this collection.reactor.core.publisher.Mono<Void>Drops an index from this collection.reactor.core.publisher.Mono<String>ensureIndex(IndexDefinition indexDefinition) Ensure that an index for the providedIndexDefinitionexists for the collection indicated by the entity class.reactor.core.publisher.Flux<IndexInfo>Returns the index information on the collection.
-
Constructor Details
-
DefaultReactiveIndexOperations
public DefaultReactiveIndexOperations(ReactiveMongoOperations mongoOperations, String collectionName, QueryMapper queryMapper) Creates a newDefaultReactiveIndexOperations.- Parameters:
mongoOperations- must not be null.collectionName- must not be null.queryMapper- must not be null.
-
DefaultReactiveIndexOperations
public DefaultReactiveIndexOperations(ReactiveMongoOperations mongoOperations, String collectionName, QueryMapper queryMapper, Class<?> type) Creates a newDefaultReactiveIndexOperations.- Parameters:
mongoOperations- must not be null.collectionName- must not be null.queryMapper- must not be null.type- used for mapping potential partial index filter expression, must not be null.
-
-
Method Details
-
ensureIndex
Description copied from interface:ReactiveIndexOperationsEnsure that an index for the providedIndexDefinitionexists for the collection indicated by the entity class. If not it will be created.- Specified by:
ensureIndexin interfaceReactiveIndexOperations- Parameters:
indexDefinition- must not be null.- Returns:
- a
Monoemitting the name of the index on completion.
-
alterIndex
Description copied from interface:ReactiveIndexOperationsAlters the index with given name.- Specified by:
alterIndexin interfaceReactiveIndexOperations- Parameters:
name- name of index to change.options- index options.
-
dropIndex
Description copied from interface:ReactiveIndexOperationsDrops an index from this collection.- Specified by:
dropIndexin interfaceReactiveIndexOperations- Parameters:
name- name of index to drop
-
dropAllIndexes
Description copied from interface:ReactiveIndexOperationsDrops all indices from this collection.- Specified by:
dropAllIndexesin interfaceReactiveIndexOperations
-
getIndexInfo
Description copied from interface:ReactiveIndexOperationsReturns the index information on the collection.- Specified by:
getIndexInfoin interfaceReactiveIndexOperations- Returns:
- index information on the collection
-