void reportHeartbeat() { lastHeartbeat = System.currentTimeMillis(); resetHeartbeatTimeout(heartbeatTimeoutIntervalMs); }
void reportHeartbeat() { lastHeartbeat = System.currentTimeMillis(); resetHeartbeatTimeout(heartbeatTimeoutIntervalMs); }
void reportHeartbeat() { lastHeartbeat = System.currentTimeMillis(); resetHeartbeatTimeout(heartbeatTimeoutIntervalMs); }
HeartbeatMonitor( ResourceID resourceID, HeartbeatTarget<O> heartbeatTarget, ScheduledExecutor scheduledExecutor, HeartbeatListener<?, O> heartbeatListener, long heartbeatTimeoutIntervalMs) { this.resourceID = Preconditions.checkNotNull(resourceID); this.heartbeatTarget = Preconditions.checkNotNull(heartbeatTarget); this.scheduledExecutor = Preconditions.checkNotNull(scheduledExecutor); this.heartbeatListener = Preconditions.checkNotNull(heartbeatListener); Preconditions.checkArgument(heartbeatTimeoutIntervalMs >= 0L, "The heartbeat timeout interval has to be larger than 0."); this.heartbeatTimeoutIntervalMs = heartbeatTimeoutIntervalMs; lastHeartbeat = 0L; resetHeartbeatTimeout(heartbeatTimeoutIntervalMs); }
HeartbeatMonitor( ResourceID resourceID, HeartbeatTarget<O> heartbeatTarget, ScheduledExecutor scheduledExecutor, HeartbeatListener<?, O> heartbeatListener, long heartbeatTimeoutIntervalMs) { this.resourceID = Preconditions.checkNotNull(resourceID); this.heartbeatTarget = Preconditions.checkNotNull(heartbeatTarget); this.scheduledExecutor = Preconditions.checkNotNull(scheduledExecutor); this.heartbeatListener = Preconditions.checkNotNull(heartbeatListener); Preconditions.checkArgument(heartbeatTimeoutIntervalMs >= 0L, "The heartbeat timeout interval has to be larger than 0."); this.heartbeatTimeoutIntervalMs = heartbeatTimeoutIntervalMs; resetHeartbeatTimeout(heartbeatTimeoutIntervalMs); }
HeartbeatMonitor( ResourceID resourceID, HeartbeatTarget<O> heartbeatTarget, ScheduledExecutor scheduledExecutor, HeartbeatListener<?, O> heartbeatListener, long heartbeatTimeoutIntervalMs) { this.resourceID = Preconditions.checkNotNull(resourceID); this.heartbeatTarget = Preconditions.checkNotNull(heartbeatTarget); this.scheduledExecutor = Preconditions.checkNotNull(scheduledExecutor); this.heartbeatListener = Preconditions.checkNotNull(heartbeatListener); Preconditions.checkArgument(heartbeatTimeoutIntervalMs > 0L, "The heartbeat timeout interval has to be larger than 0."); this.heartbeatTimeoutIntervalMs = heartbeatTimeoutIntervalMs; lastHeartbeat = 0L; resetHeartbeatTimeout(heartbeatTimeoutIntervalMs); }
HeartbeatMonitor( ResourceID resourceID, HeartbeatTarget<O> heartbeatTarget, ScheduledExecutor scheduledExecutor, HeartbeatListener<?, O> heartbeatListener, long heartbeatTimeoutIntervalMs) { this.resourceID = Preconditions.checkNotNull(resourceID); this.heartbeatTarget = Preconditions.checkNotNull(heartbeatTarget); this.scheduledExecutor = Preconditions.checkNotNull(scheduledExecutor); this.heartbeatListener = Preconditions.checkNotNull(heartbeatListener); Preconditions.checkArgument(heartbeatTimeoutIntervalMs > 0L, "The heartbeat timeout interval has to be larger than 0."); this.heartbeatTimeoutIntervalMs = heartbeatTimeoutIntervalMs; lastHeartbeat = 0L; resetHeartbeatTimeout(heartbeatTimeoutIntervalMs); }
void reportHeartbeat() { resetHeartbeatTimeout(heartbeatTimeoutIntervalMs); }