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 IMonitorService
public void stopMonitoring(MonitorConnectionContext context)
IMonitorService
MonitorConnectionContext
. Removes the context from the Monitor
.stopMonitoring
in interface IMonitorService
context
- The MonitorConnectionContext
representing a connection.public void stopMonitoringForAllConnections(java.util.Set<java.lang.String> nodeKeys)
IMonitorService
stopMonitoringForAllConnections
in interface IMonitorService
nodeKeys
- All known references to a server.public void releaseResources()
releaseResources
in interface IMonitorService
public void notifyUnused(IMonitor monitor)
IMonitorService
IMonitor
.notifyUnused
in interface IMonitorService
monitor
- 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.