public class MongoMappingEventPublisher extends Object implements ApplicationEventPublisher
MappingContextEvents for use by the index
creator when MongoTemplate is used 'stand-alone', that is not declared inside a Spring ApplicationContext.
Declare MongoTemplate inside an ApplicationContext to enable the publishing of all persistence events
such as AfterLoadEvent, AfterSaveEvent, etc.| Constructor and Description |
|---|
MongoMappingEventPublisher(ApplicationListener<MappingContextEvent<?,?>> indexCreator)
Creates a new
MongoMappingEventPublisher for the given ApplicationListener. |
MongoMappingEventPublisher(MongoPersistentEntityIndexCreator indexCreator)
Creates a new
MongoMappingEventPublisher for the given MongoPersistentEntityIndexCreator. |
| Modifier and Type | Method and Description |
|---|---|
void |
publishEvent(ApplicationEvent event) |
void |
publishEvent(Object event) |
public MongoMappingEventPublisher(ApplicationListener<MappingContextEvent<?,?>> indexCreator)
MongoMappingEventPublisher for the given ApplicationListener.indexCreator - must not be null.public MongoMappingEventPublisher(MongoPersistentEntityIndexCreator indexCreator)
MongoMappingEventPublisher for the given MongoPersistentEntityIndexCreator.indexCreator - must not be null.public void publishEvent(ApplicationEvent event)
publishEvent in interface ApplicationEventPublisherpublic void publishEvent(Object event)
publishEvent in interface ApplicationEventPublisherCopyright © 2011–2022 Pivotal Software, Inc.. All rights reserved.