public class LimitlessRouterMonitor extends AbstractMonitor
| Modifier and Type | Field and Description |
|---|---|
protected @NonNull ConnectionService |
connectionService |
protected @NonNull HostSpec |
hostSpec |
protected int |
intervalMs |
protected @NonNull java.lang.String |
limitlessRouterCacheKey |
protected static java.lang.String |
MONITORING_PROPERTY_PREFIX |
protected java.sql.Connection |
monitoringConn |
protected @NonNull java.util.Properties |
props |
protected @NonNull LimitlessQueryHelper |
queryHelper |
protected @NonNull StorageService |
storageService |
protected @NonNull TelemetryFactory |
telemetryFactory |
protected static long |
TERMINATION_TIMEOUT_SEC |
lastActivityTimestampNanos, monitorExecutor, state, stop, terminationTimeoutSec| Constructor and Description |
|---|
LimitlessRouterMonitor(@NonNull PluginService pluginService,
@NonNull ConnectionService connectionService,
@NonNull TelemetryFactory telemetryFactory,
@NonNull HostSpec hostSpec,
@NonNull StorageService storageService,
@NonNull java.lang.String limitlessRouterCacheKey,
@NonNull java.util.Properties props,
int intervalMs) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes all resources used by this monitor.
|
void |
monitor()
Executes the monitoring loop for this monitor.
|
canDispose, getLastActivityTimestampNanos, getState, run, start, stopprotected static final java.lang.String MONITORING_PROPERTY_PREFIX
protected static final long TERMINATION_TIMEOUT_SEC
protected final int intervalMs
protected final @NonNull HostSpec hostSpec
protected final @NonNull StorageService storageService
protected final @NonNull java.lang.String limitlessRouterCacheKey
protected final @NonNull java.util.Properties props
protected final @NonNull ConnectionService connectionService
protected final @NonNull LimitlessQueryHelper queryHelper
protected final @NonNull TelemetryFactory telemetryFactory
protected java.sql.Connection monitoringConn
public LimitlessRouterMonitor(@NonNull PluginService pluginService, @NonNull ConnectionService connectionService, @NonNull TelemetryFactory telemetryFactory, @NonNull HostSpec hostSpec, @NonNull StorageService storageService, @NonNull java.lang.String limitlessRouterCacheKey, @NonNull java.util.Properties props, int intervalMs)
public void close()
MonitorMonitor.stop().close in interface Monitorclose in class AbstractMonitorpublic void monitor()
MonitorMonitor.start(). Additionally, the monitoring loop should regularly update the last
activity timestamp so that the MonitorService can detect whether the monitor is stuck or not.