public class HostMonitorServiceImpl extends java.lang.Object implements HostMonitorService
| Modifier and Type | Field and Description |
|---|---|
static AwsWrapperProperty |
MONITOR_DISPOSAL_TIME_MS |
| Constructor and Description |
|---|
HostMonitorServiceImpl(@NonNull PluginService pluginService) |
| Modifier and Type | Method and Description |
|---|---|
protected HostMonitor |
getMonitor(java.util.Set<java.lang.String> nodeKeys,
HostSpec hostSpec,
java.util.Properties properties)
Get or create a
HostMonitorImpl for a server. |
void |
releaseResources() |
HostMonitorConnectionContext |
startMonitoring(java.sql.Connection connectionToAbort,
java.util.Set<java.lang.String> nodeKeys,
HostSpec hostSpec,
java.util.Properties properties,
int failureDetectionTimeMillis,
int failureDetectionIntervalMillis,
int failureDetectionCount) |
void |
stopMonitoring(@NonNull HostMonitorConnectionContext context)
Stop monitoring for a connection represented by the given
HostMonitorConnectionContext. |
void |
stopMonitoringForAllConnections(@NonNull java.util.Set<java.lang.String> nodeKeys)
Stop monitoring the node for all connections represented by the given set of node keys.
|
public static final AwsWrapperProperty MONITOR_DISPOSAL_TIME_MS
public HostMonitorServiceImpl(@NonNull PluginService pluginService)
public HostMonitorConnectionContext startMonitoring(java.sql.Connection connectionToAbort, java.util.Set<java.lang.String> nodeKeys, HostSpec hostSpec, java.util.Properties properties, int failureDetectionTimeMillis, int failureDetectionIntervalMillis, int failureDetectionCount)
startMonitoring in interface HostMonitorServicepublic void stopMonitoring(@NonNull HostMonitorConnectionContext context)
HostMonitorServiceHostMonitorConnectionContext.
Removes the context from the HostMonitorImpl.stopMonitoring in interface HostMonitorServicecontext - The HostMonitorConnectionContext representing a connection.public void stopMonitoringForAllConnections(@NonNull java.util.Set<java.lang.String> nodeKeys)
HostMonitorServicestopMonitoringForAllConnections in interface HostMonitorServicenodeKeys - All known references to a server.public void releaseResources()
releaseResources in interface HostMonitorServiceprotected HostMonitor getMonitor(java.util.Set<java.lang.String> nodeKeys, HostSpec hostSpec, java.util.Properties properties)
HostMonitorImpl for a server.nodeKeys - All references to the server requiring monitoring.hostSpec - Information such as hostname of the server.properties - The user configuration for the current connection.HostMonitorImpl object associated with a specific server.