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 providedIndexDefinition
exists 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, wait
Methods 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:ReactiveIndexOperations
Ensure that an index for the providedIndexDefinition
exists for the collection indicated by the entity class. If not it will be created.- Specified by:
ensureIndex
in interfaceReactiveIndexOperations
- Parameters:
indexDefinition
- must not be null.- Returns:
- a
Mono
emitting the name of the index on completion.
-
alterIndex
Description copied from interface:ReactiveIndexOperations
Alters the index with given name.- Specified by:
alterIndex
in interfaceReactiveIndexOperations
- Parameters:
name
- name of index to change.options
- index options.
-
dropIndex
Description copied from interface:ReactiveIndexOperations
Drops an index from this collection.- Specified by:
dropIndex
in interfaceReactiveIndexOperations
- Parameters:
name
- name of index to drop
-
dropAllIndexes
Description copied from interface:ReactiveIndexOperations
Drops all indices from this collection.- Specified by:
dropAllIndexes
in interfaceReactiveIndexOperations
-
getIndexInfo
Description copied from interface:ReactiveIndexOperations
Returns the index information on the collection.- Specified by:
getIndexInfo
in interfaceReactiveIndexOperations
- Returns:
- index information on the collection
-