Class PojoMassIndexingBatchCoordinator
- java.lang.Object
-
- org.hibernate.search.mapper.pojo.massindexing.impl.PojoMassIndexingFailureHandledRunnable
-
- org.hibernate.search.mapper.pojo.massindexing.impl.PojoMassIndexingBatchCoordinator
-
- All Implemented Interfaces:
Runnable
public class PojoMassIndexingBatchCoordinator extends PojoMassIndexingFailureHandledRunnable
Makes sure that several different BatchIndexingWorkspace(s) can be started concurrently, sharing the same batch-backend and IndexWriters.- Author:
- Sanne Grinovero
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPojoMassIndexingBatchCoordinator.SessionContext
-
Constructor Summary
Constructors Constructor Description PojoMassIndexingBatchCoordinator(PojoMassIndexingMappingContext mappingContext, PojoMassIndexingNotifier notifier, List<PojoMassIndexingIndexedTypeGroup<?>> typeGroupsToIndex, PojoScopeSchemaManager scopeSchemaManager, Set<String> tenantIds, PojoScopeDelegate<?,?,?> pojoScopeDelegate, MassIndexingEnvironment environment, int typesToIndexInParallel, int documentBuilderThreads, boolean mergeSegmentsOnFinish, boolean dropAndCreateSchemaOnStart, boolean purgeAtStart, boolean mergeSegmentsAfterPurge)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcleanUpOnFailure()protected voidcleanUpOnInterruption()protected voidnotifyFailure(RuntimeException exception)protected voidnotifyInterrupted(InterruptedException exception)protected voidnotifySuccess()voidrunWithFailureHandler()-
Methods inherited from class org.hibernate.search.mapper.pojo.massindexing.impl.PojoMassIndexingFailureHandledRunnable
afterExecution, beforeExecution, createMassIndexingEnvironmentContext, getMassIndexingEnvironment, getNotifier, notifyError, operationName, run, supportsThreadLifecycleHooks
-
-
-
-
Constructor Detail
-
PojoMassIndexingBatchCoordinator
public PojoMassIndexingBatchCoordinator(PojoMassIndexingMappingContext mappingContext, PojoMassIndexingNotifier notifier, List<PojoMassIndexingIndexedTypeGroup<?>> typeGroupsToIndex, PojoScopeSchemaManager scopeSchemaManager, Set<String> tenantIds, PojoScopeDelegate<?,?,?> pojoScopeDelegate, MassIndexingEnvironment environment, int typesToIndexInParallel, int documentBuilderThreads, boolean mergeSegmentsOnFinish, boolean dropAndCreateSchemaOnStart, boolean purgeAtStart, boolean mergeSegmentsAfterPurge)
-
-
Method Detail
-
runWithFailureHandler
public void runWithFailureHandler() throws InterruptedException- Specified by:
runWithFailureHandlerin classPojoMassIndexingFailureHandledRunnable- Throws:
InterruptedException
-
cleanUpOnInterruption
protected void cleanUpOnInterruption() throws InterruptedException- Specified by:
cleanUpOnInterruptionin classPojoMassIndexingFailureHandledRunnable- Throws:
InterruptedException
-
cleanUpOnFailure
protected void cleanUpOnFailure()
- Specified by:
cleanUpOnFailurein classPojoMassIndexingFailureHandledRunnable
-
notifySuccess
protected void notifySuccess()
- Overrides:
notifySuccessin classPojoMassIndexingFailureHandledRunnable
-
notifyInterrupted
protected void notifyInterrupted(InterruptedException exception)
- Overrides:
notifyInterruptedin classPojoMassIndexingFailureHandledRunnable
-
notifyFailure
protected void notifyFailure(RuntimeException exception)
- Overrides:
notifyFailurein classPojoMassIndexingFailureHandledRunnable
-
-