public interface UpgradeDriverManager
| Modifier and Type | Field and Description |
|---|---|
static int |
TASK_ANALYZE
The task value that indicates the upgrade driver is executing the
analyze method. |
static int |
TASK_NONE
The task value that indicates no upgrade driver task is being performed.
|
static int |
TASK_POSTUPGRADE
The task value that indicates the upgrade driver is executing the
postUpgrade method. |
static int |
TASK_PREUPGRADE
The task value that indicates the upgrade driver is executing the
preUpgrade method. |
static int |
TASK_ROLLBACK
The task value that indicates the upgrade driver is executing the
rollback method. |
static int |
TASK_UPGRADE
The task value that indicates the upgrade driver is executing the
upgrade method. |
| Modifier and Type | Method and Description |
|---|---|
void |
addUpgradeDriverListener(UpgradeDriverListener udl)
Adds an UpgradeDriverListener.
|
boolean |
analyze()
Starts or continues the analysis phase of a schema upgrade.
|
void |
dispose()
Disposes this UpgradeDriverManager.
|
int |
getCurrentTask()
Gets the current task being performed by the upgrade driver.
|
UpgradeStatus |
getMostRecentUpgrade()
Gets the most-recent schema upgrade performed or attempted.
|
UpgradeStatus[] |
getUpgradeHistory()
Gets the history of all schema upgrades performed or attempted, in
chronological order.
|
boolean |
isDisposed()
Gets whether
dispose has been called on this
UpgradeDriverManager. |
boolean |
postUpgrade()
Starts or continues the post-upgrade phase of a schema upgrade.
|
boolean |
preUpgrade()
Starts, continues, or repeats the pre-upgrade phase of a schema upgrade.
|
void |
removeUpgradeDriverListener(UpgradeDriverListener udl)
Removes an UpgradeDriverListener.
|
boolean |
rollback(boolean offline)
Starts or continues rolling back a schema upgrade.
|
void |
stop()
|
String |
toStatusLabel(int status)
Gets a string representation of the specified status value.
|
String |
toTaskLabel(int task)
Gets a string representation of the specified task value.
|
boolean |
upgrade(boolean offline)
Starts or continues the upgrade phase of a schema upgrade.
|
static final int TASK_NONE
static final int TASK_ANALYZE
analyze method.static final int TASK_PREUPGRADE
preUpgrade method.static final int TASK_UPGRADE
upgrade method.static final int TASK_POSTUPGRADE
postUpgrade method.static final int TASK_ROLLBACK
rollback method.void addUpgradeDriverListener(UpgradeDriverListener udl) throws IfsException
udl - the listenerIfsException - if the operation failsvoid removeUpgradeDriverListener(UpgradeDriverListener udl) throws IfsException
udl - the listenerIfsException - if the operation failsboolean analyze()
throws IfsException
An exception is thrown if analyze, preUpgrade,
upgrade, postUpgrade, or rollback
are underway in another thread.
When the method is called, the upgrade
status must be Initialized or Analyzing. Otherwise an exception is
thrown.
If the analyze method of an upgrade action
in the schema upgrade throws an exception, it is logged and rethrown.
The upgrade status is set to Analyzing.
The method returns when the analysis phase is completed or stopped. If the analysis phase completes with no errors, the upgrade
status is set to Analyzed and true is returned; otherwise
the upgrade status is set to Analyzing and false is returned.
IfsException - if the operation failsboolean preUpgrade()
throws IfsException
An exception is thrown if analyze, preUpgrade,
upgrade, postUpgrade, or rollback
are underway in another thread.
When the method is called, the upgrade
status must be Analyzed, Pre-upgrading, or Pre-upgraded. Otherwise an
exception is thrown.
If the preUpgrade method of an upgrade
action in the schema upgrade throws an exception, it is logged and
rethrown. The upgrade status is set to Pre-upgrading.
The method returns when the pre-upgrade phase is completed or stopped. If the pre-upgrade phase completes with no errors, the upgrade
status is set to Pre-upgraded and true is returned; otherwise
the upgrade status is set to Pre-upgrading and false is
returned.
IfsException - if the operation failsboolean upgrade(boolean offline)
throws IfsException
An exception is thrown if analyze, preUpgrade,
upgrade, postUpgrade, or rollback
are underway in another thread.
When the method is called, the upgrade
status must be Pre-upgraded or Upgrading. Otherwise an exception is
thrown.
The upgrade phase must be performed with the repository offline (that is,
with all nodes stopped). If the repository is not offline, as indicated
by the offline argument, an exception is thrown.
If the upgrade method of an upgrade
action in the schema upgrade throws an exception, it is logged and
rethrown. The upgrade status is set to Upgrading.
The method returns when the upgrade phase is completed or stopped. If the upgrade phase completes with no errors, the upgrade
status is set to Upgraded, the schema version is updated to the target schema version, and
true is returned; otherwise the upgrade status is set to
Upgrading and false is returned.
offline - whether the repository is offline (that is, whether
all nodes are stopped)IfsException - if the operation failsboolean postUpgrade()
throws IfsException
An exception is thrown if analyze, preUpgrade,
upgrade, postUpgrade, or rollback
are underway in another thread.
When the method is called, the upgrade
status must be Upgraded or Post-upgrading. Otherwise an exception is
thrown.
If the postUpgrade method of an upgrade
action in the schema upgrade throws an exception, it is logged and
rethrown. The upgrade status is set to Post-upgrading.
The method returns when the post-upgrade phase is completed or stopped. If the post-upgrade phase completes with no errors, the
upgrade status is set to Completed and true is returned;
otherwise the upgrade status is set to Post-upgrading and false
is returned.
IfsException - if the operation failsboolean rollback(boolean offline)
throws IfsException
An exception is thrown if analyze, preUpgrade,
upgrade, postUpgrade, or rollback
are underway in another thread.
When the method is called, the upgrade
status must be Initialized, Analyzing, Analyzed, Pre-upgrading,
Pre-upgraded, Upgrading, Upgraded, Post-upgrading, Completed, or
Rolling-back. Otherwise an exception is thrown.
If the upgrade status is Upgrading, Upgraded, Post-upgrading, or Completed,
the rollback must be performed with the repository offline (that is,
with all nodes stopped). If the repository is not offline, as indicated
by the offline argument, an exception is thrown.
If the rollback method of an upgrade
action in the schema upgrade throws an exception, it is logged and
rethrown. The upgrade status is set to Rolling-back.
The method returns when the rollback is completed or stopped.
If the rollback completes with no errors, the upgrade status is set to
Rolled-back, the schema version is updated to the source schema version, and
true is returned; otherwise the upgrade status is set to
Rolling-back and false is returned.
offline - whether the repository is offline (that is, whether
all nodes are stopped)IfsException - if the operation failsint getCurrentTask()
throws IfsException
The returned value is one of:
TASK_NONE if no task is being performed,TASK_ANALYZE if executing the
analyze method,TASK_PREUPGRADE if executing the
preUpgrade method,TASK_UPGRADE if executing the
upgrade method,TASK_POSTUPGRADE if executing the
postUpgrade method, orTASK_ROLLBACK if executing the
rollback methodIfsException - if the operation failsvoid stop() throws IfsException
analyze, preUpgrade, upgrade, postUpgrade,
or rollback to stop.
If none of these methods are underway, a call to stop
has no effect.
IfsExceptionvoid dispose()
throws IfsException
After this method is called, all other methods on this interface (apart
from isDisposed, but including dispose) will
throw an exception.
IfsException - if the operation failsboolean isDisposed()
throws IfsException
dispose has been called on this
UpgradeDriverManager.IfsException - if the operation failsUpgradeStatus[] getUpgradeHistory() throws IfsException
IfsException - if the operation failsUpgradeStatus getMostRecentUpgrade() throws IfsException
If an schema upgrade is underway, this method will return that upgrade.
IfsException - if the operation failsString toTaskLabel(int task)
task - the task; must be String toStatusLabel(int status)
status - the status value; must be Copyright © 2025. All rights reserved.