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 Summary

    Modifier and Type
    Method
    Description
    void
    accept(long globalCheckpoint, Exception e)
    Callback when the global checkpoint is updated or the shard is closed.
    The executor on which the listener is notified.
  • Method Details

    • executor

      Executor executor()
      The executor on which the listener is notified.
      Returns:
      the executor
    • accept

      void accept(long globalCheckpoint, 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 to SequenceNumbers.UNASSIGNED_SEQ_NO and the exception will be non-null and an instance of IndexShardClosedException. If the listener timed out waiting for notification then the exception will be non-null and an instance of TimeoutException. If the global checkpoint is updated, the exception will be null.
      Parameters:
      globalCheckpoint - the updated global checkpoint
      e - if non-null, the shard is closed or the listener timed out