@Beta public interface UpgradeService extends ListenerService<UpgradeEvent,UpgradeEventListener>
Modifier and Type | Method and Description |
---|---|
Upgrade |
getState()
Returns the current upgrade state.
|
Version |
getVersion()
Returns the currently active software version.
|
boolean |
isLocalActive()
Returns whether the local node is active.
|
boolean |
isLocalUpgraded()
Returns whether the local node is an upgraded node.
|
boolean |
isUpgrading()
Returns whether an upgrade is in progress.
|
addListener, removeListener
Upgrade getState()
boolean isUpgrading()
An upgrade is in progress if the upgrade Upgrade.Status
is active, e.g.
Upgrade.Status.INITIALIZED
, Upgrade.Status.UPGRADED
, etc.
Version getVersion()
The returned version is representative of the version currently in control of the network. When the upgrade
transitions to the Upgrade.Status.UPGRADING
state, control over the network is transferred from
Upgrade.source()
nodes to Upgrade.target()
nodes, and the version returned by this method
represents that change.
boolean isLocalActive()
The local node will be active if its Version
matches the version returned by getVersion()
.
boolean isLocalUpgraded()
true
if the local node's version matches Upgrade.target()