public class SubsysResourceMonitor
extends java.lang.Object
This class is used by MasterComponentImplBase
and should not be exposed to subsystem developers directly.
However, the contained interfaces SubsysResourceMonitor.ResourceChecker
and SubsysResourceMonitor.ResourceErrorHandler can be implemented
by master components to supply customized checkers and error handlers
for various resource types and error recovery strategies.
| Modifier and Type | Class and Description |
|---|---|
static class |
SubsysResourceMonitor.ComponentChecker<T extends ACSComponent>
Implementation of
ResourceChecker for ACS components. |
static class |
SubsysResourceMonitor.PingableResourceChecker<T extends PingableResourceOperations>
A custom
ResourceChecker for objects implementing
PingableResource interface. |
static interface |
SubsysResourceMonitor.ResourceChecker<T>
Encapsulates the details of a particular resource,
so that all resources (components, offshoots, databases, ...) can
be monitored in the same way.
|
static interface |
SubsysResourceMonitor.ResourceErrorHandler<T>
Error handler that gets notified when a monitored resource becomes unavailable or degraded.
|
| Modifier and Type | Field and Description |
|---|---|
int |
defaultDelaySeconds
The delay between two monitoring calls to resource.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getNumberOfMonitorTasks()
For testing only.
|
void |
resume()
Resumes monitoring of all resources.
|
void |
stopMonitoring(java.lang.String resourceName)
Stops monitoring a given resource.
|
void |
stopMonitoringAll()
Stops monitoring all resources.
|
void |
suspend()
Suspends monitoring of all resources until
resume() is called. |
public final int defaultDelaySeconds
public int getNumberOfMonitorTasks()
public void suspend()
resume() is called.
Currently running monitor calls do not get stopped, only future calls are prevented.
Note that the monitoring queue remains intact, while the monitor call itself becomes a no-op.
public void resume()
This method has no effect if monitoring has not been previously suspended.
suspend()public void stopMonitoring(java.lang.String resourceName)
resourceName - unique resource namepublic void stopMonitoringAll()