com.arjuna.ats.arjuna.recovery
Class RecoveryManager

java.lang.Object
  extended bycom.arjuna.ats.arjuna.recovery.RecoveryManager

public class RecoveryManager
extends java.lang.Object

The RecoveryManager daemon.


Field Summary
static int DIRECT_MANAGEMENT
          In this mode the recovery manager does not run periodically and will only work if driven through messages or via the scan operation if it is embedded.
static int INDIRECT_MANAGEMENT
          In this mode the recovery manager runs periodically but may also be driven through messages or via the scan operation if it is embedded.
 
Method Summary
 void addModule(RecoveryModule module)
          Add a recovery module to the system.
static void delayRecoveryManagerThread()
          Delay the start of the recovery manager thread when creating an indirect recovery manager.
 java.util.Vector getModules()
           
static void main(java.lang.String[] args)
          Run the RecoveryManager.
static RecoveryManager manager()
          Obtain a reference to the RecoveryManager singleton.
static RecoveryManager manager(int mode)
          Obtain a reference to the RecoveryManager singleton.
 int mode()
          Indicates what mode (INDIRECT_MANAGEMENT or DIRECT_MANAGEMENT) the recovery manager is configured for.
 void scan()
          Force a recovery scan now.
 void scan(RecoveryScan callback)
          Force a recovery scan now.
 void startRecoveryManagerThread()
          Start the recovery manager thread.
 void stop()
          Stop the periodic recovery manager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INDIRECT_MANAGEMENT

public static final int INDIRECT_MANAGEMENT
In this mode the recovery manager runs periodically but may also be driven through messages or via the scan operation if it is embedded.

See Also:
Constant Field Values

DIRECT_MANAGEMENT

public static final int DIRECT_MANAGEMENT
In this mode the recovery manager does not run periodically and will only work if driven through messages or via the scan operation if it is embedded.

See Also:
Constant Field Values
Method Detail

manager

public static final RecoveryManager manager()
                                     throws java.lang.IllegalArgumentException
Obtain a reference to the RecoveryManager singleton. If it hasn't been created yet then it will be. The manager will be created in the INDIRECT_MANAGEMENT mode.

Returns:
the manager.
Throws:
java.lang.IllegalArgumentException

manager

public static final RecoveryManager manager(int mode)
                                     throws java.lang.IllegalArgumentException
Obtain a reference to the RecoveryManager singleton. If it hasn't been created yet then it will be. The manager can be created in a management mode defined by the parameter.

Parameters:
mode - the management mode for the manager.
Returns:
the manager.
Throws:
java.lang.IllegalArgumentException

delayRecoveryManagerThread

public static void delayRecoveryManagerThread()
Delay the start of the recovery manager thread when creating an indirect recovery manager.


scan

public final void scan()
Force a recovery scan now. This is a blocking operation and will only return once the recovery scan has completed.


scan

public final void scan(RecoveryScan callback)
Force a recovery scan now. This is a non-blocking operation and will return immediately. Notification of completion of the scan is done through the RecoveryScan object.


stop

public final void stop()
Stop the periodic recovery manager.


startRecoveryManagerThread

public void startRecoveryManagerThread()
Start the recovery manager thread.


addModule

public final void addModule(RecoveryModule module)
Add a recovery module to the system.


getModules

public final java.util.Vector getModules()

mode

public final int mode()
Indicates what mode (INDIRECT_MANAGEMENT or DIRECT_MANAGEMENT) the recovery manager is configured for.

Returns:
the management mode.

main

public static void main(java.lang.String[] args)
Run the RecoveryManager. See Administration manual for details.