public class DefaultMonitorService extends java.lang.Object implements IMonitorService
| Modifier and Type | Field and Description |
|---|---|
protected static java.util.concurrent.Executor |
ABORT_EXECUTOR |
protected static long |
CACHE_CLEANUP_NANO |
protected Log |
logger |
protected IMonitorInitializer |
monitorInitializer |
protected static SlidingExpirationCacheWithCleanupThread<java.lang.String,IMonitor> |
monitors |
| Constructor and Description |
|---|
DefaultMonitorService(Log logger) |
| Modifier and Type | Method and Description |
|---|---|
protected IMonitor |
getMonitor(HostInfo hostInfo,
PropertySet propertySet,
int failureDetectionTimeMillis,
int failureDetectionIntervalMillis,
int failureDetectionCount) |
void |
releaseResources() |
MonitorConnectionContext |
startMonitoring(JdbcConnection connectionToAbort,
HostInfo hostInfo,
PropertySet propertySet,
int failureDetectionTimeMillis,
int failureDetectionIntervalMillis,
int failureDetectionCount) |
void |
stopMonitoring(@NonNull MonitorConnectionContext context,
@NonNull java.sql.Connection connectionToAbort)
Stop monitoring for a connection represented by the given
MonitorConnectionContext. |
protected static final long CACHE_CLEANUP_NANO
protected static final java.util.concurrent.Executor ABORT_EXECUTOR
protected static final SlidingExpirationCacheWithCleanupThread<java.lang.String,IMonitor> monitors
protected final Log logger
protected final IMonitorInitializer monitorInitializer
public DefaultMonitorService(Log logger)
public MonitorConnectionContext startMonitoring(JdbcConnection connectionToAbort, HostInfo hostInfo, PropertySet propertySet, int failureDetectionTimeMillis, int failureDetectionIntervalMillis, int failureDetectionCount)
startMonitoring in interface IMonitorServicepublic void stopMonitoring(@NonNull MonitorConnectionContext context, @NonNull java.sql.Connection connectionToAbort)
IMonitorServiceMonitorConnectionContext.
Removes the context from the IMonitor.stopMonitoring in interface IMonitorServicecontext - The MonitorConnectionContext representing a connection.public void releaseResources()
releaseResources in interface IMonitorServiceprotected IMonitor getMonitor(HostInfo hostInfo, PropertySet propertySet, int failureDetectionTimeMillis, int failureDetectionIntervalMillis, int failureDetectionCount)