Package com.tangosol.net
Interface ServiceMonitor
- All Superinterfaces:
AutoCloseable
,Disposable
- All Known Implementing Classes:
SimpleServiceMonitor
The
ServiceMonitor
is a facility that keeps registered services
alive. It is bound to a ConfigurableCacheFactory
whilst alive
and should allow for ConfigurableCacheFactory
s to be changed and
reflected upon restart of the monitor.- Since:
- Coherence 12.1.2
- Author:
- cf 2011.05.24, hr 2012.06.28
-
Method Summary
Modifier and TypeMethodDescriptionReturn the thread used by this ServiceMonitor.boolean
Returns true iff the ServiceMonitor is monitoring a number of services.void
registerServices
(Map<Service, String> mapServices) Adds a set ofService
s to be monitored providing life support.void
Set theConfigurableCacheFactory
aServiceMonitor
can operate with.void
Stop monitoring all registered services.void
unregisterServices
(Set<Service> setServices) Removes the supplied set ofService
s from monitoring.Methods inherited from interface com.oracle.coherence.common.base.Disposable
close, dispose
-
Method Details
-
registerServices
Adds a set ofService
s to be monitored providing life support. If any of the services are not running they are started either via the configuredConfigurableCacheFactory
iff provided or the providedService
.- Parameters:
mapServices
- a map ofService
s where values are non-scoped service names
-
unregisterServices
Removes the supplied set ofService
s from monitoring. Note that the services are not being stopped; they are just removed from the list ofService
s that are being monitored.- Parameters:
setServices
- the set ofService
s to be removed from monitoring
-
stopMonitoring
void stopMonitoring()Stop monitoring all registered services. Note that the services are not being stopped; they are just removed from the list ofService
s that are being monitored. -
isMonitoring
boolean isMonitoring()Returns true iff the ServiceMonitor is monitoring a number of services.- Returns:
- returns true iff the ServiceMonitor is monitoring a number of services
-
setConfigurableCacheFactory
Set theConfigurableCacheFactory
aServiceMonitor
can operate with. Setting theConfigurableCacheFactory
should be performed prior to registering services or requires astopMonitoring()
andregisterServices(Map)
call.- Parameters:
ccf
- theConfigurableCacheFactory
used to start the service
-
getThread
Thread getThread()Return the thread used by this ServiceMonitor.
-