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
ConstructorsConstructorDescriptionCoordinationConfigurationContextImpl(BeanHolder<? extends CoordinationStrategy> strategyHolder) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()configure(ConfigurationPropertySource propertySource, BeanResolver beanResolver) voidAdds a mapping producer, to register entities automatically without user intervention.voidRequests 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>
-
Constructor Details
-
CoordinationConfigurationContextImpl
public CoordinationConfigurationContextImpl(BeanHolder<? extends CoordinationStrategy> strategyHolder)
-
-
Method Details
-
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
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
-
createAutomaticIndexingStrategy
-
mappingProducers
-