Package com.atlassian.bamboo
Interface ClusterAwareLifecycleManager
-
- All Known Implementing Classes:
ClusterAwareLifecycleManagerImpl
@Internal public interface ClusterAwareLifecycleManagerManages the cluster life cycle. Responsible for setting different states for both the whole cluster and the current node. UseNodeLifecycleProviderto get current node life cycle.- Since:
- 9.5
-
-
Method Summary
-
-
-
Method Detail
-
nodeStarting
void nodeStarting()
Puts the current node into theNodeLifecycleState.STARTINGstate
-
nodeRunning
void nodeRunning()
Puts the current node into theNodeLifecycleState.RUNNINGstate
-
nodeRunningAsSecondary
void nodeRunningAsSecondary()
Puts the current node into theNodeLifecycleState.RUNNING_AS_SECONDARYstate
-
pauseCluster
CompletableFuture<NodeLifecycleState> pauseCluster()
Submits pause cluster request.- Returns:
- Future for pause cluster operation
-
pauseCluster
CompletableFuture<NodeLifecycleState> pauseCluster(@NotNull @NotNull NodeLifecycleState fakeNodeLifecycleState)
Submits pause cluster request with the context of the current node state being fakeNodeLifecycleState. This method is considered extremely unsafe because calling it might end up with an undermined node state.- Parameters:
fakeNodeLifecycleState- Node state in which context the pause cluster request is executed- Returns:
- Future for force pause cluster operation
-
prepareNodeForRestart
@NotNull @NotNull NodeLifecycleState prepareNodeForRestart()
Puts the current node into theNodeLifecycleState.PREPARING_FOR_RESTARTstate- Returns:
NodeLifecycleStateof the current node
-
resumeCluster
@NotNull @NotNull NodeLifecycleState resumeCluster()
Puts the cluster into theNodeLifecycleState.RUNNINGstate- Returns:
NodeLifecycleStateof the current node
-
getNodeLifecycleState
@NotNull @NotNull NodeLifecycleState getNodeLifecycleState()
- Returns:
- gets the
NodeLifecycleStateof the current node
-
getBufferedNodeLifecycleState
@NotNull @NotNull NodeLifecycleState getBufferedNodeLifecycleState()
- Returns:
- gets the cached
NodeLifecycleStateof the current node, the result is eventually consistent
-
refreshNodeLifecycleState
boolean refreshNodeLifecycleState()
Refreshes the cachedNodeLifecycleState- Returns:
- whether the refresh was successfully performed
-
getClusterLifecycleState
@NotNull @NotNull ClusterLifecycleState getClusterLifecycleState()
- Returns:
- gets the
ClusterLifecycleStateof the cluster
-
-