public class DefaultMonitorService extends java.lang.Object implements IMonitorService
| Constructor and Description |
|---|
DefaultMonitorService(Log logger) |
| Modifier and Type | Method and Description |
|---|---|
protected IMonitor |
getMonitor(java.util.Set<java.lang.String> nodeKeys,
HostInfo hostInfo,
PropertySet propertySet)
Get or create a
Monitor for a server. |
void |
notifyUnused(IMonitor monitor)
Handle unused
IMonitor. |
void |
releaseResources() |
MonitorConnectionContext |
startMonitoring(JdbcConnection connectionToAbort,
java.util.Set<java.lang.String> nodeKeys,
HostInfo hostInfo,
PropertySet propertySet,
int failureDetectionTimeMillis,
int failureDetectionIntervalMillis,
int failureDetectionCount) |
void |
stopMonitoring(MonitorConnectionContext context)
Stop monitoring for a connection represented by the given
MonitorConnectionContext. |
void |
stopMonitoringForAllConnections(java.util.Set<java.lang.String> nodeKeys)
Stop monitoring the node for all connections represented by the given set of node keys.
|
public DefaultMonitorService(Log logger)
public MonitorConnectionContext startMonitoring(JdbcConnection connectionToAbort, java.util.Set<java.lang.String> nodeKeys, HostInfo hostInfo, PropertySet propertySet, int failureDetectionTimeMillis, int failureDetectionIntervalMillis, int failureDetectionCount)
startMonitoring in interface IMonitorServicepublic void stopMonitoring(MonitorConnectionContext context)
IMonitorServiceMonitorConnectionContext. Removes the context from the Monitor.stopMonitoring in interface IMonitorServicecontext - The MonitorConnectionContext representing a connection.public void stopMonitoringForAllConnections(java.util.Set<java.lang.String> nodeKeys)
IMonitorServicestopMonitoringForAllConnections in interface IMonitorServicenodeKeys - All known references to a server.public void releaseResources()
releaseResources in interface IMonitorServicepublic void notifyUnused(IMonitor monitor)
IMonitorServiceIMonitor.notifyUnused in interface IMonitorServicemonitor - The IMonitor in idle.protected IMonitor getMonitor(java.util.Set<java.lang.String> nodeKeys, HostInfo hostInfo, PropertySet propertySet)
Monitor for a server.nodeKeys - All references to the server requiring monitoring.hostInfo - Information such as hostname of the server.propertySet - The user configuration for the current connection.Monitor object associated with a specific server.