- java.lang.Object
-
- com.lmax.disruptor.EventuallyGiveUpBatchRewindStrategy
-
- All Implemented Interfaces:
BatchRewindStrategy
public class EventuallyGiveUpBatchRewindStrategy extends java.lang.Object implements BatchRewindStrategy
Strategy for handling a rewindableException that will eventually delegate the exception to the
ExceptionHandlerafter a specified number of attempts have been made.
-
-
Constructor Summary
Constructors Constructor Description EventuallyGiveUpBatchRewindStrategy(long maxAttempts)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RewindActionhandleRewindException(RewindableException e, int retriesAttempted)When aRewindableExceptionis thrown, this will be called.
-
-
-
Method Detail
-
handleRewindException
public RewindAction handleRewindException(RewindableException e, int retriesAttempted)
Description copied from interface:BatchRewindStrategyWhen aRewindableExceptionis thrown, this will be called.- Specified by:
handleRewindExceptionin interfaceBatchRewindStrategy- Parameters:
e- the exception that propagated from theEventHandler.retriesAttempted- how many attempts there have been for the batch- Returns:
- the decision of whether to rewind the batch or throw the exception
-
-