Interface UpgradeAdminService


  • @Beta
    public interface UpgradeAdminService
    Abstraction for executing the stages of the upgrade process.

    Upgrades are performed in three phases:

    • initialize - Initializes an upgrade
    • upgrade - Performs an upgrade, transferring device mastership from the current version to the upgraded version
    • commit or rollback - Completes or rolls back an upgrade, transferring mastership back to nodes running the previous version
    • Method Detail

      • initialize

        void initialize()
        Initializes an upgrade.

        This method must be called to initialize an upgrade and prior to physically upgrading any nodes.

        Throws:
        java.lang.IllegalStateException - if an upgrade is already in progress
      • upgrade

        void upgrade()
        Performs an upgrade, transferring device mastership to upgraded nodes.

        This method transfers mastership from the current version of the software to the upgraded version. Thus, a subset of the nodes in the cluster must have been physically upgraded and restarted prior to executing this phase of the upgrade protocol.

        Throws:
        java.lang.IllegalStateException - if no upgrade has been initialized
      • commit

        void commit()
        Commits an upgrade.

        Completes the upgrade process, committing the new cluster version.

        Throws:
        java.lang.IllegalStateException - if no upgrade is in progress or not all nodes have been upgraded
      • rollback

        void rollback()
        Rolls back an upgrade.

        When an upgrade is rolled back, mastership is transferred from upgraded nodes back to nodes running the version of the software prior to the upgrade.

        Throws:
        java.lang.IllegalStateException - if no upgrade is in progress
      • reset

        void reset()
        Resets an upgrade.

        When an upgrade is rolled back, once nodes have been restored to the previos version the upgrade must be reset to restore the upgrade state to Upgrade.Status.INACTIVE.

        Throws:
        java.lang.IllegalStateException - if nodes have not been restored to the previous state