Class RecoveryManagerImple
java.lang.Object
com.arjuna.ats.internal.arjuna.recovery.RecoveryManagerImple
The RecoveryManagerImple - does the real work. Currently we can have only one
of these per node, so each instance checks it's the only one running. If it
isn't it will kill itself before doing any work.
-
Constructor Summary
ConstructorDescriptionRecoveryManagerImple
(boolean threaded) Does the work of setting up crash recovery. -
Method Summary
Modifier and TypeMethodDescriptionfinal void
addModule
(RecoveryModule module) final Vector<RecoveryModule>
final void
removeAllModules
(boolean waitOnScan) final void
removeModule
(RecoveryModule module, boolean waitOnScan) void
final void
scan()
void
start()
void
stop
(boolean async) stop the recovery managertrySuspendScan
(boolean async) Suspend the recovery manager.void
wait for the recovery implementation to be shut down.
-
Constructor Details
-
RecoveryManagerImple
public RecoveryManagerImple(boolean threaded) Does the work of setting up crash recovery.- Parameters:
threaded
- iftrue
then the manager will start a separate thread to run recovery periodically.
-
-
Method Details
-
scan
public final void scan() -
addModule
-
removeModule
-
removeAllModules
public final void removeAllModules(boolean waitOnScan) -
getModules
-
start
public void start() -
stop
public void stop(boolean async) stop the recovery manager- Parameters:
async
- false means wait for any recovery scan in progress to complete
-
trySuspendScan
Suspend the recovery manager. If the recovery manager is in the process of doing recovery scans then it will be suspended afterwards, in order to preserve data integrity.- Parameters:
async
- false means wait for the recovery manager to finish any scans before returning.
-
resumeScan
public void resumeScan() -
waitForTermination
public void waitForTermination()wait for the recovery implementation to be shut down.
-