public class HostResponseTimeServiceImpl extends java.lang.Object implements HostResponseTimeService
| Modifier and Type | Field and Description |
|---|---|
protected static long |
CACHE_CLEANUP_NANO |
protected static long |
CACHE_EXPIRATION_NANO |
protected static java.util.concurrent.locks.ReentrantLock |
cacheLock |
protected java.util.List<HostSpec> |
hosts |
protected int |
intervalMs |
protected static SlidingExpirationCacheWithCleanupThread<java.lang.String,NodeResponseTimeMonitor> |
monitoringNodes |
protected @NonNull PluginService |
pluginService |
protected @NonNull java.util.Properties |
props |
protected TelemetryFactory |
telemetryFactory |
| Constructor and Description |
|---|
HostResponseTimeServiceImpl(@NonNull PluginService pluginService,
@NonNull java.util.Properties props,
int intervalMs) |
| Modifier and Type | Method and Description |
|---|---|
int |
getResponseTime(HostSpec hostSpec)
Return a response time in milliseconds to the host.
|
void |
setHosts(@NonNull java.util.List<HostSpec> hosts)
Provides an updated host list to a service.
|
protected static final long CACHE_EXPIRATION_NANO
protected static final long CACHE_CLEANUP_NANO
protected static final SlidingExpirationCacheWithCleanupThread<java.lang.String,NodeResponseTimeMonitor> monitoringNodes
protected static final java.util.concurrent.locks.ReentrantLock cacheLock
protected int intervalMs
protected java.util.List<HostSpec> hosts
protected final @NonNull PluginService pluginService
protected final @NonNull java.util.Properties props
protected final TelemetryFactory telemetryFactory
public HostResponseTimeServiceImpl(@NonNull PluginService pluginService, @NonNull java.util.Properties props, int intervalMs)
public int getResponseTime(HostSpec hostSpec)
HostResponseTimeServicegetResponseTime in interface HostResponseTimeServicehostSpec - the host detailspublic void setHosts(@NonNull java.util.List<HostSpec> hosts)
HostResponseTimeServicesetHosts in interface HostResponseTimeService