- java.lang.Object
-
- com.lmax.disruptor.NanosecondPauseBatchRewindStrategy
-
- All Implemented Interfaces:
BatchRewindStrategy
public class NanosecondPauseBatchRewindStrategy extends java.lang.Object implements BatchRewindStrategy
Strategy for handling a rewindableException that will pause for a specified amount of nanos.
-
-
Constructor Summary
Constructors Constructor Description NanosecondPauseBatchRewindStrategy(long nanoSecondPauseTime)
Strategy for handling a rewindableException that will pause for a specified amount of nanos.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RewindAction
handleRewindException(RewindableException e, int retriesAttempted)
When aRewindableException
is thrown, this will be called.
-
-
-
Constructor Detail
-
NanosecondPauseBatchRewindStrategy
public NanosecondPauseBatchRewindStrategy(long nanoSecondPauseTime)
Strategy for handling a rewindableException that will pause for a specified amount of nanos.
- Parameters:
nanoSecondPauseTime
- Amount of nanos to pause for when a rewindable exception is thrown
-
-
Method Detail
-
handleRewindException
public RewindAction handleRewindException(RewindableException e, int retriesAttempted)
Description copied from interface:BatchRewindStrategy
When aRewindableException
is thrown, this will be called.- Specified by:
handleRewindException
in 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
-
-