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.createIndex(IndexDefinition indexDefinition) Create the index for the providedIndexDefinitionfor the collection indicated by the entity class.Drops all indices from this collection.Drops an index from this collection.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
ensureIndex
-
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
-
createIndex
Description copied from interface:ReactiveIndexOperationsCreate the index for the providedIndexDefinitionfor the collection indicated by the entity class. If the index does not exist it will be created. Might error if the collection already defines an index with the same name but different settings.- Specified by:
createIndexin interfaceReactiveIndexOperations- Parameters:
indexDefinition- must not be null.- Returns:
- the index name.
-
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
-