public class NodeResponseTimeMonitor extends AbstractMonitor implements EventSubscriber
lastActivityTimestampNanos, monitorExecutor, state, stop, terminationTimeoutSec| Constructor and Description |
|---|
NodeResponseTimeMonitor(@NonNull PluginService pluginService,
@NonNull HostSpec hostSpec,
@NonNull java.util.Properties props,
int intervalMs) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes all resources used by this monitor.
|
protected void |
closeConnection() |
protected long |
getCurrentTime() |
@NonNull HostSpec |
getHostSpec() |
int |
getResponseTime() |
void |
monitor()
Executes the monitoring loop for this monitor.
|
void |
processEvent(Event event)
Processes an event.
|
protected void |
reset() |
canDispose, getLastActivityTimestampNanos, getState, run, start, stoppublic NodeResponseTimeMonitor(@NonNull PluginService pluginService, @NonNull HostSpec hostSpec, @NonNull java.util.Properties props, int intervalMs)
public int getResponseTime()
public @NonNull HostSpec getHostSpec()
protected long getCurrentTime()
public 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.public void close()
MonitorMonitor.stop().close in interface Monitorclose in class AbstractMonitorprotected void closeConnection()
protected void reset()
public void processEvent(Event event)
EventSubscriberEventPublisher.subscribe(software.amazon.jdbc.util.events.EventSubscriber, java.util.Set<java.lang.Class<? extends software.amazon.jdbc.util.events.Event>>).processEvent in interface EventSubscriberevent - the event to process.