summaryrefslogtreecommitdiffstats
path: root/jdisc_core
diff options
context:
space:
mode:
authorBjørn Christian Seime <bjorncs@yahoo-inc.com>2017-06-09 12:43:00 +0200
committerBjørn Christian Seime <bjorncs@yahoo-inc.com>2017-06-09 12:43:52 +0200
commit1d596e78db2406e19993c2e96b5f867df3ebca36 (patch)
tree4b582a0fc093039593f29cc981fc08a59679b2b9 /jdisc_core
parentb5ca7c8c1a89507d609bb4cf003be8602fd9a0fb (diff)
Use scheduleAtFixedRate instead of scheduleWithFixedDelay
Diffstat (limited to 'jdisc_core')
-rw-r--r--jdisc_core/src/main/java/com/yahoo/jdisc/core/ActiveContainerDeactivationWatchdog.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/jdisc_core/src/main/java/com/yahoo/jdisc/core/ActiveContainerDeactivationWatchdog.java b/jdisc_core/src/main/java/com/yahoo/jdisc/core/ActiveContainerDeactivationWatchdog.java
index 96bbb6a4111..a6b4ef03c61 100644
--- a/jdisc_core/src/main/java/com/yahoo/jdisc/core/ActiveContainerDeactivationWatchdog.java
+++ b/jdisc_core/src/main/java/com/yahoo/jdisc/core/ActiveContainerDeactivationWatchdog.java
@@ -44,7 +44,7 @@ class ActiveContainerDeactivationWatchdog implements ActiveContainerMetrics, Aut
ActiveContainerDeactivationWatchdog() {
this(
Clock.systemUTC(),
- new ScheduledThreadPoolExecutor(1, runnable -> {
+ new ScheduledThreadPoolExecutor(2, runnable -> {
Thread thread = new Thread(runnable, "active-container-deactivation-watchdog");
thread.setDaemon(true);
return thread;
@@ -54,12 +54,12 @@ class ActiveContainerDeactivationWatchdog implements ActiveContainerMetrics, Aut
ActiveContainerDeactivationWatchdog(Clock clock, ScheduledExecutorService scheduler) {
this.clock = clock;
this.scheduler = scheduler;
- this.scheduler.scheduleWithFixedDelay(
+ this.scheduler.scheduleAtFixedRate(
this::warnOnStaleContainers,
WATCHDOG_FREQUENCY.getSeconds(),
WATCHDOG_FREQUENCY.getSeconds(),
TimeUnit.SECONDS);
- this.scheduler.scheduleWithFixedDelay(
+ this.scheduler.scheduleAtFixedRate(
ActiveContainerDeactivationWatchdog::triggerGc,
GC_TRIGGER_FREQUENCY.getSeconds(),
GC_TRIGGER_FREQUENCY.getSeconds(),