Package org.elasticsearch.index.shard
Interface GlobalCheckpointListeners.GlobalCheckpointListener
- Enclosing class:
- GlobalCheckpointListeners
public static interface GlobalCheckpointListeners.GlobalCheckpointListener
A global checkpoint listener consisting of a callback that is notified when the global checkpoint is updated or the shard is closed.
-
Method Details
-
executor
java.util.concurrent.Executor executor()The executor on which the listener is notified.- Returns:
- the executor
-
accept
void accept(long globalCheckpoint, java.lang.Exception e)Callback when the global checkpoint is updated or the shard is closed. If the shard is closed, the value of the global checkpoint will be set toSequenceNumbers.UNASSIGNED_SEQ_NO
and the exception will be non-null and an instance ofIndexShardClosedException
. If the listener timed out waiting for notification then the exception will be non-null and an instance ofTimeoutException
. If the global checkpoint is updated, the exception will be null.- Parameters:
globalCheckpoint
- the updated global checkpointe
- if non-null, the shard is closed or the listener timed out
-