Package com.tangosol.net
Interface ServiceMonitor
-
- All Superinterfaces:
AutoCloseable,Disposable
- All Known Implementing Classes:
SimpleServiceMonitor
public interface ServiceMonitor extends Disposable
TheServiceMonitoris a facility that keeps registered services alive. It is bound to aConfigurableCacheFactorywhilst alive and should allow forConfigurableCacheFactorys 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ThreadgetThread()Return the thread used by this ServiceMonitor.booleanisMonitoring()Returns true iff the ServiceMonitor is monitoring a number of services.voidregisterServices(Map<Service,String> mapServices)Adds a set ofServices to be monitored providing life support.voidsetConfigurableCacheFactory(ConfigurableCacheFactory ccf)Set theConfigurableCacheFactoryaServiceMonitorcan operate with.voidstopMonitoring()Stop monitoring all registered services.voidunregisterServices(Set<Service> setServices)Removes the supplied set ofServices from monitoring.-
Methods inherited from interface com.oracle.coherence.common.base.Disposable
close, dispose
-
-
-
-
Method Detail
-
registerServices
void registerServices(Map<Service,String> mapServices)
Adds a set ofServices to be monitored providing life support. If any of the services are not running they are started either via the configuredConfigurableCacheFactoryiff provided or the providedService.- Parameters:
mapServices- a map ofServices where values are non-scoped service names
-
unregisterServices
void unregisterServices(Set<Service> setServices)
Removes the supplied set ofServices from monitoring. Note that the services are not being stopped; they are just removed from the list ofServices that are being monitored.- Parameters:
setServices- the set ofServices 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 ofServices 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
void setConfigurableCacheFactory(ConfigurableCacheFactory ccf)
Set theConfigurableCacheFactoryaServiceMonitorcan operate with. Setting theConfigurableCacheFactoryshould be performed prior to registering services or requires astopMonitoring()andregisterServices(Map)call.- Parameters:
ccf- theConfigurableCacheFactoryused to start the service
-
getThread
Thread getThread()
Return the thread used by this ServiceMonitor.
-
-