|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.arjuna.ats.arjuna.recovery.RecoveryManager
public class RecoveryManager
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. |
static java.net.Socket |
getClientSocket()
Obtain a client connection to the recovery manager |
java.util.Vector |
getModules()
Obtain a snapshot list of available recovery modules. |
static java.net.InetAddress |
getRecoveryManagerHost()
|
static int |
getRecoveryManagerPort()
|
void |
initialize()
If the recovery manager has been shutdown previously then recreate it in the same mode as before. |
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 |
removeModule(RecoveryModule module,
boolean waitOnScan)
Remove a recovery module from the system. |
void |
resume()
|
void |
resumeScan()
Deprecated. use resume |
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()
Deprecated. use terminate instead. |
void |
stop(boolean async)
Deprecated. use terminate instead. |
void |
suspend(boolean async)
Suspend the recovery manager. |
void |
suspendScan(boolean async)
Deprecated. use suspend |
void |
terminate()
Terminate and cleanup the recovery manager. |
void |
terminate(boolean async)
Terminate and cleanup the recovery manager. |
void |
waitForTermination()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int INDIRECT_MANAGEMENT
public static final int DIRECT_MANAGEMENT
Method Detail |
---|
public static final RecoveryManager manager() throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public static final RecoveryManager manager(int mode) throws java.lang.IllegalArgumentException
mode
- the management mode for the manager.
java.lang.IllegalArgumentException
public static void delayRecoveryManagerThread()
public final void scan()
java.lang.IllegalStateException
- if the recovery manager has been shutdown.public final void scan(RecoveryScan callback)
callback
- callback The callback mechanism used to
inform users that the scan has completed. If this is null
then no callback will happen and asynchronous scanning will occur.
java.lang.IllegalStateException
- if the recovery manager has been shutdown.public final void stop()
java.lang.IllegalStateException
- if the recovery manager has been shutdown.public final void stop(boolean async)
async
- false means wait for any recovery scan in progress to complete.
java.lang.IllegalStateException
- if the recovery manager has been shutdown.public final void terminate()
java.lang.IllegalStateException
- if the recovery manager has been shutdown.public final void terminate(boolean async)
async
- false means wait for any recovery scan in progress to complete.
java.lang.IllegalStateException
- if the recovery manager has been shutdown.public final void initialize()
public void waitForTermination()
java.lang.IllegalStateException
- if the recovery manager has been shutdown.public void suspendScan(boolean async)
async
- false means wait for the recovery manager to finish any scans before returning.
java.lang.IllegalStateException
- if the recovery manager has been shutdown.public void suspend(boolean async)
async
- false means wait for the recovery manager to finish any scans before returning.
java.lang.IllegalStateException
- if the recovery manager has been shutdown.public void resumeScan()
java.lang.IllegalStateException
- if the recovery manager has been shutdown.public void resume()
java.lang.IllegalStateException
- if the recovery manager has been shutdown.public void startRecoveryManagerThread()
java.lang.IllegalStateException
- if the recovery manager has been shutdown.public final void addModule(RecoveryModule module)
module
- module The module to add.
java.lang.IllegalStateException
- if the recovery manager has been shutdown.public final void removeModule(RecoveryModule module, boolean waitOnScan)
module
- The module to remove.waitOnScan
- true if the remove operation should wait for any in-progress scan to complete
java.lang.IllegalStateException
- if the recovery manager has been shutdown.public final java.util.Vector getModules()
java.lang.IllegalStateException
- if the recovery manager has been shutdown.public final int mode()
public static java.net.InetAddress getRecoveryManagerHost() throws java.net.UnknownHostException
java.net.UnknownHostException
public static int getRecoveryManagerPort()
public static java.net.Socket getClientSocket() throws java.io.IOException
java.io.IOException
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |