| Constructor and Description |
|---|
Monitor(IConnectionProvider connectionProvider,
HostInfo hostInfo,
PropertySet propertySet,
long monitorDisposalTimeMillis,
IMonitorService monitorService,
Log logger)
Store the monitoring configuration for a connection.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearContexts()
Clear all
MonitorConnectionContext associated with this IMonitor instance. |
boolean |
isStopped()
Whether this
IMonitor has stopped monitoring a particular server. |
void |
run() |
void |
startMonitoring(MonitorConnectionContext context) |
void |
stopMonitoring(MonitorConnectionContext context) |
public Monitor(IConnectionProvider connectionProvider, HostInfo hostInfo, PropertySet propertySet, long monitorDisposalTimeMillis, IMonitorService monitorService, Log logger)
connectionProvider - A provider for creating new connections.hostInfo - The HostInfo of the server this Monitor instance is
monitoring.propertySet - The PropertySet containing additional monitoring configuration.monitorDisposalTimeMillis - Time in milliseconds before stopping the monitoring thread where there are
no active connection to the server this Monitor
instance is monitoring.monitorService - A reference to the DefaultMonitorService implementation
that initialized this class.logger - A Log implementation.public void startMonitoring(MonitorConnectionContext context)
startMonitoring in interface IMonitorpublic void stopMonitoring(MonitorConnectionContext context)
stopMonitoring in interface IMonitorpublic void clearContexts()
IMonitorMonitorConnectionContext associated with this IMonitor instance.clearContexts in interface IMonitorpublic void run()
run in interface java.lang.Runnable