|
Oracle® Fusion Middleware Java API Reference for Oracle Coherence 12c (12.1.3.0.0) E47890-01 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
com.tangosol.net.SimpleServiceMonitor
public class SimpleServiceMonitor
The SimpleServiceMonitor starts and monitors services that are registered for monitoring.
| Field Summary | |
|---|---|
protected static java.lang.Integer |
DEFAULT_WAIT_MILLISThe default time interval by which we check the alive status. |
protected ConfigurableCacheFactory |
m_ccfConfigurableCacheFactory instance used to start the service. |
protected long |
m_cWaitMillisThe number of milliseconds between checking the status of the services. |
protected boolean |
m_fDisposedIndicates that this ServiceMonitor has been disposed. |
protected boolean |
m_fStartedIndicates that the ServiceMonitor has started. |
protected java.util.Map |
m_mapServicesByNameA map of Services by service name to be monitored. |
protected java.lang.Thread |
m_threadThe Thread we are using for monitoring the services periodically. |
| Constructor Summary | |
|---|---|
SimpleServiceMonitor()Construct a SimpleServiceMonitor with the default interval to check that the registered services are running (). |
|
SimpleServiceMonitor(long cWaitMillis)Construct a SimpleServiceMonitor with the provided interval to check that the registered services are running. |
|
| Method Summary | |
|---|---|
protected void |
assertNotDisposed()Throws IllegalStateException if this monitor has been disposed via invocation of dispose(). |
void |
dispose() |
protected boolean |
isDisposed()Return true if this ServiceMonitor has been disposed via invocation of dispose(). |
boolean |
isMonitoring()Returns true iff the ServiceMonitor is monitoring a number of services. |
protected void |
monitorServices(long cWaitMillis)Check the service status periodically (keep alive interval), restarting any stopped services. |
void |
registerServices(java.util.Map mapServices)Adds a set of Services to be monitored providing life support. |
void |
setConfigurableCacheFactory(ConfigurableCacheFactory ccf)Set the ConfigurableCacheFactory a ServiceMonitor can operate with. |
protected void |
start()Start monitoring the services. |
void |
stopMonitoring()Stop monitoring all registered services. |
void |
unregisterServices(java.util.Set setServices)Removes the supplied set of Services from monitoring. |
| Field Detail |
|---|
protected static final java.lang.Integer DEFAULT_WAIT_MILLIS
protected volatile boolean m_fStarted
ServiceMonitor has started.protected java.lang.Thread m_thread
Thread we are using for monitoring the services periodically.protected boolean m_fDisposed
ServiceMonitor has been disposed.protected ConfigurableCacheFactory m_ccf
ConfigurableCacheFactory instance used to start the service.protected java.util.Map m_mapServicesByName
Services by service name to be monitored.protected final long m_cWaitMillis
| Constructor Detail |
|---|
public SimpleServiceMonitor()
public SimpleServiceMonitor(long cWaitMillis)
cWaitMillis - the number of milliseconds in between checking that the registered services are running| Method Detail |
|---|
public void registerServices(java.util.Map mapServices)
Services to be monitored providing life support. If any of the services are not running they are started either via the configured ConfigurableCacheFactory iff provided or the provided Service.registerServices in interface ServiceMonitormapServices - a map of Services by service namepublic void unregisterServices(java.util.Set setServices)
Services from monitoring. Note that the services are not being stopped; they are just removed from the list of Services that are being monitored.unregisterServices in interface ServiceMonitorsetServices - the set of Services to be removed from monitoringpublic void stopMonitoring()
Services that are being monitored.stopMonitoring in interface ServiceMonitorpublic boolean isMonitoring()
isMonitoring in interface ServiceMonitorpublic void setConfigurableCacheFactory(ConfigurableCacheFactory ccf)
ConfigurableCacheFactory a ServiceMonitor can operate with. Setting the ConfigurableCacheFactory should be performed prior to registering services or requires a ServiceMonitor.stopMonitoring() and ServiceMonitor.registerServices(Map) call.setConfigurableCacheFactory in interface ServiceMonitorccf - the ConfigurableCacheFactory used to start the servicepublic void dispose()
dispose in interface com.oracle.common.base.Disposableprotected void start()
protected void monitorServices(long cWaitMillis)
cWaitMillis - the number of milliseconds between checksprotected boolean isDisposed()
ServiceMonitor has been disposed via invocation of dispose().protected void assertNotDisposed()
IllegalStateException if this monitor has been disposed via invocation of dispose().java.lang.IllegalStateException - if this monitor has been disposed
|
Oracle® Fusion Middleware Java API Reference for Oracle Coherence 12c (12.1.3.0.0) E47890-01 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||