Class CoordinationConfigurationContextImpl
- java.lang.Object
-
- org.hibernate.search.mapper.orm.coordination.impl.CoordinationConfigurationContextImpl
-
- All Implemented Interfaces:
AutoCloseable,CoordinationConfigurationContext
public final class CoordinationConfigurationContextImpl extends Object implements CoordinationConfigurationContext, AutoCloseable
-
-
Constructor Summary
Constructors Constructor Description CoordinationConfigurationContextImpl(BeanHolder<? extends CoordinationStrategy> strategyHolder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()static CoordinationConfigurationContextImplconfigure(ConfigurationPropertySource propertySource, BeanResolver beanResolver)ConfiguredAutomaticIndexingStrategycreateAutomaticIndexingStrategy()voidmappingProducer(HibernateSearchOrmMappingProducer producer)Adds a mapping producer, to register entities automatically without user intervention.List<HibernateSearchOrmMappingProducer>mappingProducers()voidreindexInSession()Requests that indexing events be processed directly in the current session.voidsendIndexingEventsTo(Function<AutomaticIndexingEventSendingSessionContext,AutomaticIndexingQueueEventSendingPlan> senderFactory, boolean enlistsInTransaction)Requests that indexing events be sent to a queue.BeanHolder<? extends CoordinationStrategy>strategyHolder()
-
-
-
Constructor Detail
-
CoordinationConfigurationContextImpl
public CoordinationConfigurationContextImpl(BeanHolder<? extends CoordinationStrategy> strategyHolder)
-
-
Method Detail
-
configure
public static CoordinationConfigurationContextImpl configure(ConfigurationPropertySource propertySource, BeanResolver beanResolver)
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable
-
reindexInSession
public void reindexInSession()
Description copied from interface:CoordinationConfigurationContextRequests that indexing events be processed directly in the current session.This is incompatible with
CoordinationConfigurationContext.sendIndexingEventsTo(Function, boolean).- Specified by:
reindexInSessionin interfaceCoordinationConfigurationContext
-
sendIndexingEventsTo
public void sendIndexingEventsTo(Function<AutomaticIndexingEventSendingSessionContext,AutomaticIndexingQueueEventSendingPlan> senderFactory, boolean enlistsInTransaction)
Description copied from interface:CoordinationConfigurationContextRequests that indexing events be sent to a queue.This is incompatible with
CoordinationConfigurationContext.reindexInSession().- Specified by:
sendIndexingEventsToin interfaceCoordinationConfigurationContext- Parameters:
senderFactory- A factory to create theAutomaticIndexingQueueEventSendingPlanto send events to.enlistsInTransaction- Whether the event sender enlists in Hibernate ORM transactions, meaning event can (and should) be sent before the commit, which will automatically lead them to be sent on commit (or not sent at all in case of rollback).
-
mappingProducer
public void mappingProducer(HibernateSearchOrmMappingProducer producer)
Description copied from interface:CoordinationConfigurationContextAdds a mapping producer, to register entities automatically without user intervention.- Specified by:
mappingProducerin interfaceCoordinationConfigurationContext- Parameters:
producer- A mapping producer.
-
strategyHolder
public BeanHolder<? extends CoordinationStrategy> strategyHolder()
-
createAutomaticIndexingStrategy
public ConfiguredAutomaticIndexingStrategy createAutomaticIndexingStrategy()
-
mappingProducers
public List<HibernateSearchOrmMappingProducer> mappingProducers()
-
-