Class PojoMassIndexingFailureHandledRunnable
- java.lang.Object
-
- org.hibernate.search.mapper.pojo.massindexing.impl.PojoMassIndexingFailureHandledRunnable
-
- All Implemented Interfaces:
Runnable
- Direct Known Subclasses:
PojoMassIndexingBatchCoordinator,PojoMassIndexingBatchIndexingWorkspace,PojoMassIndexingEntityIdentifierLoadingRunnable,PojoMassIndexingEntityLoadingRunnable
public abstract class PojoMassIndexingFailureHandledRunnable extends Object implements Runnable
Common parent of all Runnable implementations for the batch indexing: share the code for handling runtime exceptions.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedPojoMassIndexingFailureHandledRunnable(PojoMassIndexingNotifier notifier, MassIndexingEnvironment environment)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidafterExecution()protected voidbeforeExecution()protected abstract voidcleanUpOnFailure()protected abstract voidcleanUpOnInterruption()protected MassIndexingEnvironment.ContextcreateMassIndexingEnvironmentContext()protected MassIndexingEnvironmentgetMassIndexingEnvironment()protected PojoMassIndexingNotifiergetNotifier()protected voidnotifyError(Error error)protected voidnotifyFailure(RuntimeException exception)protected voidnotifyInterrupted(InterruptedException exception)protected voidnotifySuccess()protected StringoperationName()voidrun()protected abstract voidrunWithFailureHandler()protected booleansupportsThreadLifecycleHooks()
-
-
-
Constructor Detail
-
PojoMassIndexingFailureHandledRunnable
protected PojoMassIndexingFailureHandledRunnable(PojoMassIndexingNotifier notifier, MassIndexingEnvironment environment)
-
-
Method Detail
-
runWithFailureHandler
protected abstract void runWithFailureHandler() throws InterruptedException- Throws:
InterruptedException
-
cleanUpOnInterruption
protected abstract void cleanUpOnInterruption() throws InterruptedException- Throws:
InterruptedException
-
cleanUpOnFailure
protected abstract void cleanUpOnFailure() throws InterruptedException- Throws:
InterruptedException
-
createMassIndexingEnvironmentContext
protected MassIndexingEnvironment.Context createMassIndexingEnvironmentContext()
-
supportsThreadLifecycleHooks
protected boolean supportsThreadLifecycleHooks()
-
beforeExecution
protected void beforeExecution()
-
afterExecution
protected void afterExecution()
-
getNotifier
protected final PojoMassIndexingNotifier getNotifier()
-
getMassIndexingEnvironment
protected final MassIndexingEnvironment getMassIndexingEnvironment()
-
notifySuccess
protected void notifySuccess()
-
notifyError
protected void notifyError(Error error)
-
notifyInterrupted
protected void notifyInterrupted(InterruptedException exception)
-
notifyFailure
protected void notifyFailure(RuntimeException exception)
-
operationName
protected String operationName()
-
-