PingAM

NodeVersionUpgrader.UpgraderMetadata annotation

The NodeVersionUpgrader.UpgraderMetadata annotation on the upgrader class specifies the version and the previousUpgrader attributes, both of which are required.

For example, the following is the @NodeVersionUpgrader.UpgraderMetadata annotation for version 2 of a Custom node:

@NodeVersionUpgrader.UpgraderMetadata(version = 2, previousUpgrader = NoUpgrades.class)

Version

The version attribute specifies the version of the new node.

Previous Upgrader

The previousUpgrader attribute specifies the class name of the previous upgrader:

  • If this annotation is for the node’s first upgrader (upgrading from version 1 to version 2), set previousUpgrader = NoUpgrades.class to signify there isn’t a previous upgrader.

  • If this annotation is for a subsequent upgrader (for example, upgrading from version 2 to version 3), set previousUpgrader to the class name of the upgrader for the previous node version.

    For example, if this annotation is for an upgrade from version 2 to version 3, specify the name of the upgrader class for the version 2 node.