Interface RetryClusterService

All Known Implementing Classes:
DefaultRetryClusterService

public interface RetryClusterService
Used to keep track of start/stop behavior that determines node leadership in a cluster. This service is specifically responsible for setting up RetryHandler instances for any qualified NotificationStateRepository detected.
Author:
Jeff Fischer
  • Method Details

    • start

      @Deprecated(since="1.8.3") void start()
      Deprecated.
      Use Lifecycle.start() instead
      Start the cluster service.
    • start

      void start(@Nullable List<Consumer<RetryHandlerStatus>> consumers)
      Start the cluster service with a list of consumers for retry handler status events
      Parameters:
      consumers - consumers for retry handler status events. May be null.
    • isStarted

      boolean isStarted()
      Whether the cluster service is already started.
      Returns:
      Whether the cluster service is already started.
    • stop

      void stop()
      Stop the node as a leader in the cluster.
    • setLifecycleRequirementMet

      void setLifecycleRequirementMet(RetryClusterServiceRequirementType requirementMet)
      Notify a retry cluster service instance that a particular lifecycle event has been met. If all requirements are met, the cluster service is started. Note, any calls to start(List) or start() will immediately start the service, regardless if the prerequisites are met.
      Parameters:
      requirementMet - The lifecycle requirement event that occurred.
      See Also:
    • getLifecycleRequirementsMet

      Set<RetryClusterServiceRequirementType> getLifecycleRequirementsMet()
      Retrieve the list of lifecycle requirements that have been met.
      Returns:
      The list of lifecycle requirements that have been met.
      See Also:
    • setStatusConsumers

      void setStatusConsumers(List<Consumer<RetryHandlerStatus>> consumers)
      Set the list of consumers for RetryHandlerStatus on the cluster service.
      Parameters:
      consumers - The list of status consumers