public class HostMonitorImpl extends java.lang.Object implements HostMonitor
Connection.| Modifier and Type | Field and Description |
|---|---|
protected static java.util.concurrent.Executor |
ABORT_EXECUTOR |
| Constructor and Description |
|---|
HostMonitorImpl(@NonNull PluginService pluginService,
@NonNull HostSpec hostSpec,
@NonNull java.util.Properties properties,
int failureDetectionTimeMillis,
int failureDetectionIntervalMillis,
int failureDetectionCount,
TelemetryCounter abortedConnectionsCounter)
Store the monitoring configuration for a connection.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canDispose() |
void |
close() |
void |
newContextRun() |
void |
run() |
void |
startMonitoring(HostMonitorConnectionContext context) |
public HostMonitorImpl(@NonNull PluginService pluginService, @NonNull HostSpec hostSpec, @NonNull java.util.Properties properties, int failureDetectionTimeMillis, int failureDetectionIntervalMillis, int failureDetectionCount, TelemetryCounter abortedConnectionsCounter)
pluginService - A service for creating new connections.hostSpec - The HostSpec of the server this HostMonitorImpl
instance is monitoring.properties - The Properties containing additional monitoring
configuration.failureDetectionTimeMillis - A failure detection time in millis.failureDetectionIntervalMillis - A failure detection interval in millis.failureDetectionCount - A failure detection count.abortedConnectionsCounter - Aborted connection telemetry counter.public boolean canDispose()
canDispose in interface HostMonitorpublic void close()
throws java.lang.Exception
close in interface java.lang.AutoCloseablejava.lang.Exceptionpublic void startMonitoring(HostMonitorConnectionContext context)
startMonitoring in interface HostMonitorpublic void newContextRun()
public void run()
run in interface java.lang.Runnable