Interface GlobalCheckpointListeners.GlobalCheckpointListener

  • Enclosing class:
    GlobalCheckpointListeners
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    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, java.lang.Exception e)
      Callback when the global checkpoint is updated or the shard is closed.
    • Method Detail

      • 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 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