Class ReactiveMongoPersistentEntityIndexCreator
java.lang.Object
org.springframework.data.mongodb.core.index.ReactiveMongoPersistentEntityIndexCreator
Component that inspects
MongoPersistentEntity
instances contained in the given MongoMappingContext
for indexing metadata and ensures the indexes to be available using reactive infrastructure.- Since:
- 2.1
- Author:
- Mark Paluch
-
Constructor Summary
ConstructorDescriptionReactiveMongoPersistentEntityIndexCreator
(MongoMappingContext mappingContext, ReactiveIndexOperationsProvider operationsProvider) Creates a newReactiveMongoPersistentEntityIndexCreator
for the givenMongoMappingContext
,ReactiveIndexOperationsProvider
.ReactiveMongoPersistentEntityIndexCreator
(MongoMappingContext mappingContext, ReactiveIndexOperationsProvider operationsProvider, IndexResolver indexResolver) Creates a newReactiveMongoPersistentEntityIndexCreator
for the givenMongoMappingContext
,ReactiveIndexOperationsProvider
, andIndexResolver
. -
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<Void>
checkForIndexes
(MongoPersistentEntity<?> entity) Inspect entities for index creation.boolean
isIndexCreatorFor
(MappingContext<?, ?> context) Returns whether the current index creator was registered for the givenMappingContext
.
-
Constructor Details
-
ReactiveMongoPersistentEntityIndexCreator
public ReactiveMongoPersistentEntityIndexCreator(MongoMappingContext mappingContext, ReactiveIndexOperationsProvider operationsProvider) Creates a newReactiveMongoPersistentEntityIndexCreator
for the givenMongoMappingContext
,ReactiveIndexOperationsProvider
.- Parameters:
mappingContext
- must not be null.operationsProvider
- must not be null.
-
ReactiveMongoPersistentEntityIndexCreator
public ReactiveMongoPersistentEntityIndexCreator(MongoMappingContext mappingContext, ReactiveIndexOperationsProvider operationsProvider, IndexResolver indexResolver) Creates a newReactiveMongoPersistentEntityIndexCreator
for the givenMongoMappingContext
,ReactiveIndexOperationsProvider
, andIndexResolver
.- Parameters:
mappingContext
- must not be null.operationsProvider
- must not be null.indexResolver
- must not be null.
-
-
Method Details
-
isIndexCreatorFor
Returns whether the current index creator was registered for the givenMappingContext
.- Parameters:
context
-- Returns:
-
checkForIndexes
Inspect entities for index creation.- Returns:
- a
Mono
that completes without value after indexes were created.
-