public class RecoveryManager extends Object
| Modifier and Type | Field and Description |
|---|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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 Socket |
getClientSocket()
Obtain a client connection to the recovery manager
|
Vector<RecoveryModule> |
getModules()
Obtain a snapshot list of available recovery modules.
|
static 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(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 |
removeAllModules(boolean waitOnScan)
Remove all modules.
|
void |
removeModule(RecoveryModule module,
boolean waitOnScan)
Remove a recovery module from the system.
|
void |
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 |
suspend(boolean async)
Suspend the recovery manager.
|
void |
terminate()
Terminate and cleanup the recovery manager.
|
void |
terminate(boolean async)
Terminate and cleanup the recovery manager.
|
void |
waitForTermination()
wait for the recovery thread to be shutdown.
|
public static final int INDIRECT_MANAGEMENT
public static final int DIRECT_MANAGEMENT
public static final RecoveryManager manager() throws IllegalArgumentException
IllegalArgumentException - thrown if the manager has already been
created in a different mode to that requested.public static final RecoveryManager manager(int mode) throws IllegalArgumentException
mode - the management mode for the manager.IllegalArgumentException - thrown if the manager has already been
created in a different mode to that requested.public static void delayRecoveryManagerThread()
public final void scan()
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.IllegalStateException - if the recovery manager has been shutdown.public final void terminate()
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.IllegalStateException - if the recovery manager has been shutdown.public final void initialize()
public void waitForTermination()
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.IllegalStateException - if the recovery manager has been shutdown.public void resume()
IllegalStateException - if the recovery manager has been shutdown.public void startRecoveryManagerThread()
IllegalStateException - if the recovery manager has been shutdown.public final void addModule(RecoveryModule module)
module - module The module to add.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 completeIllegalStateException - if the recovery manager has been shutdown.public final void removeAllModules(boolean waitOnScan)
public final Vector<RecoveryModule> getModules()
IllegalStateException - if the recovery manager has been shutdown.public final int mode()
public static InetAddress getRecoveryManagerHost() throws UnknownHostException
UnknownHostExceptionpublic static int getRecoveryManagerPort()
public static Socket getClientSocket() throws IOException
IOExceptionpublic static void main(String[] args)
Copyright © 2013 JBoss by Red Hat. All Rights Reserved.