public class HostMonitorServiceV2Impl extends java.lang.Object implements HostMonitorService, StateSnapshotProvider
| Modifier and Type | Class and Description |
|---|---|
protected static class |
HostMonitorServiceV2Impl.HostMonitorKey |
| Modifier and Type | Field and Description |
|---|---|
protected static java.util.concurrent.Executor |
ABORT_EXECUTOR |
protected @Nullable TelemetryCounter |
abortedConnectionsCounter |
protected ConnectionContextService |
connectionContextService |
protected MonitorService |
coreMonitorService |
protected int |
failureDetectionCount |
protected int |
failureDetectionIntervalMillis |
protected int |
failureDetectionTimeMillis |
static AwsWrapperProperty |
MONITOR_DISPOSAL_TIME_MS |
protected HostMonitorServiceV2Impl.HostMonitorKey |
monitorKey |
protected PluginService |
pluginService |
protected FullServicesContainer |
serviceContainer |
protected TelemetryFactory |
telemetryFactory |
| Constructor and Description |
|---|
HostMonitorServiceV2Impl(@NonNull FullServicesContainer serviceContainer,
java.util.Properties props) |
| Modifier and Type | Method and Description |
|---|---|
static void |
closeAllMonitors() |
protected HostMonitor |
getMonitor(HostSpec hostSpec,
java.util.Properties properties)
Get or create a
HostMonitorV2Impl for a server. |
java.util.List<Pair<java.lang.String,java.lang.Object>> |
getSnapshotState() |
ConnectionContext |
startMonitoring(java.sql.Connection connectionToAbort,
HostSpec hostSpec,
java.util.Properties properties) |
void |
stopMonitoring(@NonNull ConnectionContext context)
Stop monitoring for a connection represented by the given
HostMonitorConnectionContext. |
public static final AwsWrapperProperty MONITOR_DISPOSAL_TIME_MS
protected static final java.util.concurrent.Executor ABORT_EXECUTOR
protected final FullServicesContainer serviceContainer
protected final PluginService pluginService
protected final ConnectionContextService connectionContextService
protected final MonitorService coreMonitorService
protected final TelemetryFactory telemetryFactory
protected final @Nullable TelemetryCounter abortedConnectionsCounter
protected final int failureDetectionTimeMillis
protected final int failureDetectionIntervalMillis
protected final int failureDetectionCount
protected HostMonitorServiceV2Impl.HostMonitorKey monitorKey
public HostMonitorServiceV2Impl(@NonNull FullServicesContainer serviceContainer, java.util.Properties props)
public static void closeAllMonitors()
public ConnectionContext startMonitoring(java.sql.Connection connectionToAbort, HostSpec hostSpec, java.util.Properties properties) throws java.sql.SQLException
startMonitoring in interface HostMonitorServicejava.sql.SQLExceptionpublic void stopMonitoring(@NonNull ConnectionContext context)
HostMonitorServiceHostMonitorConnectionContext.
Removes the context from the HostMonitor.stopMonitoring in interface HostMonitorServicecontext - The HostMonitorConnectionContext representing a connection.protected HostMonitor getMonitor(HostSpec hostSpec, java.util.Properties properties) throws java.sql.SQLException
HostMonitorV2Impl for a server.hostSpec - Information such as hostname of the server.properties - The user configuration for the current connection.HostMonitorV2Impl object associated with a specific server.java.sql.SQLException - if there's errors getting or creating a monitorpublic java.util.List<Pair<java.lang.String,java.lang.Object>> getSnapshotState()
getSnapshotState in interface StateSnapshotProvider