public class RestrictionInterrupter<T>
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
boolean |
tryInterrupt(T position)
Returns true if the restriction tracker should be interrupted in claiming new positions.
|
static <T> RestrictionInterrupter<T> |
withSoftTimeout(Duration timeout)
Sets a soft timeout from now for processing new positions.
|
public static <T> RestrictionInterrupter<T> withSoftTimeout(Duration timeout)
public boolean tryInterrupt(T position)
true
if the position processing should continue, false
if the soft
deadline has been reached and we have fully processed the previous position.