Package org.gridgain.internal.upgrade
Interface RollingUpgradeManager
- All Superinterfaces:
org.apache.ignite.internal.lang.Debuggable,org.apache.ignite.internal.manager.IgniteComponent
public interface RollingUpgradeManager
extends org.apache.ignite.internal.manager.IgniteComponent
Rolling upgrade manager.
-
Field Summary
Fields inherited from interface org.apache.ignite.internal.lang.Debuggable
INDENTATION -
Method Summary
Modifier and TypeMethodDescriptionBlock configuration updates if needed.Cancels rolling upgrade process.Commits rolling upgrade process.isNodeUpgraded(String nodeId) Checks if the node is upgraded to the target version.isTargetVersion(String version) Checks is provided version is the target version for rolling upgrade.Returns future that shows whether upgrade is in progress or not.voidregisterCommitListener(UpgradeCommitListener listener) Registers a listener that will be notified when the rolling upgrade is committed.startUpgrade(String version) Starts rolling upgrade process.Retrieves the current state of the rolling upgrade process.Methods inherited from interface org.apache.ignite.internal.lang.Debuggable
dumpStateMethods inherited from interface org.apache.ignite.internal.manager.IgniteComponent
beforeNodeStop, startAsync, stopAsync, stopAsync
-
Method Details
-
startUpgrade
Starts rolling upgrade process.- Parameters:
version- Version to upgrade.- Returns:
- Future with
truevalue if upgrade successfully started.
-
commitUpgrade
CompletableFuture<Boolean> commitUpgrade()Commits rolling upgrade process.- Returns:
- Future with
truevalue if upgrade successfully committed.
-
cancelUpgrade
CompletableFuture<Boolean> cancelUpgrade()Cancels rolling upgrade process.- Returns:
- Future with
truevalue if upgrade successfully canceled.
-
isUpgradeInProgress
CompletableFuture<Boolean> isUpgradeInProgress()Returns future that shows whether upgrade is in progress or not. -
blockConfigurationUpdatesIfNeeded
CompletableFuture<Void> blockConfigurationUpdatesIfNeeded()Block configuration updates if needed. -
isNodeUpgraded
Checks if the node is upgraded to the target version.- Parameters:
nodeId- Node consistent ID.
-
isTargetVersion
Checks is provided version is the target version for rolling upgrade.- Parameters:
version- Version to check.
-
upgradeState
CompletableFuture<UpgradeState> upgradeState()Retrieves the current state of the rolling upgrade process.- Returns:
- A future containing the current state of the rolling upgrade.
-
registerCommitListener
Registers a listener that will be notified when the rolling upgrade is committed.If no rolling upgrade is currently in progress, the listener is called immediately with the current cluster version. If a rolling upgrade is in progress, the listener is called when it commits.
This method is safe to call at any point — it atomically checks the upgrade state and registers the listener, avoiding the race condition between
isUpgradeInProgress()and the actual commit.- Parameters:
listener- Listener to register.
-