Interface Configurator
public interface Configurator
Provides pseudo-transactional semantics to system configuration tasks.
In order to use, invoke the various start, stop, create,
delete, update, methods in the intended order of operation, then invoke one of the
commit methods to complete the transaction.
This code is experimental. While this class is functional and tested, it may change or be removed in a future version of the library.
-
Method Summary
-
Method Details
-
commit
Sequentially invokes all the transaction's operations, committing their changes. If a failure occurs during the processing, a rollback is attempted of those handlers that had already been committed.After commit is called, this
Configuratorshould not be used again.In the case of a successful commit, changes should be logged.
auditParamsare interpolated into theauditMessageusing the Log4J interpolation style.- Parameters:
auditMessage- In the case of a successful commit, the message to pass to be auditedauditParams- In the case of a successful commit, optional parameters to pass to be interpolated into the message.- Returns:
- report of the commit status, whether successful, successfully rolled back, or partially rolled back with errors
-
add
Adds anOperationstep to the transaction.- Parameters:
operation- the step to be added- Returns:
- a unique identifier for the step
-