Interface UpgradeListener


public interface UpgradeListener
Listener that is notified about rolling upgrade lifecycle events.

Components that need to enable version-gated features after the rolling upgrade commits should register an implementation of this listener via RollingUpgradeManager.registerUpgradeListener(UpgradeListener).

  • Method Details

    • onUpgradeStarted

      default void onUpgradeStarted(String targetVersion)
      Called when a new rolling upgrade is started. This allows listeners to block version-gated features while the cluster is in a transitional state.

      The default implementation does nothing, so existing listeners that only care about the commit event are not affected.

      Parameters:
      targetVersion - The version that the cluster is being upgraded to.
    • onUpgradeCommitted

      CompletableFuture<Void> onUpgradeCommitted(String committedVersion)
      Called when the rolling upgrade is committed.

      This method may be invoked more than once for the same version (e.g. on node restart). Implementations must be idempotent.

      Parameters:
      committedVersion - The version that the cluster has been upgraded to.
      Returns:
      A future that completes when the listener has finished processing the commit event.