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 Summary
Modifier and TypeMethodDescriptionRetrieve the list of lifecycle requirements that have been met.booleanWhether the cluster service is already started.voidsetLifecycleRequirementMet(RetryClusterServiceRequirementType requirementMet) Notify a retry cluster service instance that a particular lifecycle event has been met.voidsetStatusConsumers(List<Consumer<RetryHandlerStatus>> consumers) Set the list of consumers forRetryHandlerStatuson the cluster service.voidstart()Deprecated.voidstart(List<Consumer<RetryHandlerStatus>> consumers) Start the cluster service with a list of consumers for retry handler status eventsvoidstop()Stop the node as a leader in the cluster.
-
Method Details
-
start
Deprecated.UseLifecycle.start()insteadStart the cluster service. -
start
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
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 tostart(List)orstart()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
Set the list of consumers forRetryHandlerStatuson the cluster service.- Parameters:
consumers- The list of status consumers
-
Lifecycle.start()instead