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 TypeMethodDescriptionalterIndex(String name, IndexOptions options) Alters the index with given name.Drops all indices from this collection.Drops an index from this collection.ensureIndex(IndexDefinition indexDefinition) Ensure that an index for the providedIndexDefinitionexists for the collection indicated by the entity class.Returns the index information on the collection.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.data.mongodb.core.index.ReactiveIndexOperations
createIndex
-
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
-