aboutsummaryrefslogtreecommitdiffstats
path: root/container-core/src/main/java/com/yahoo/container/protect/FreezeDetector.java
diff options
context:
space:
mode:
Diffstat (limited to 'container-core/src/main/java/com/yahoo/container/protect/FreezeDetector.java')
-rw-r--r--container-core/src/main/java/com/yahoo/container/protect/FreezeDetector.java57
1 files changed, 0 insertions, 57 deletions
diff --git a/container-core/src/main/java/com/yahoo/container/protect/FreezeDetector.java b/container-core/src/main/java/com/yahoo/container/protect/FreezeDetector.java
deleted file mode 100644
index 6a8a3239c17..00000000000
--- a/container-core/src/main/java/com/yahoo/container/protect/FreezeDetector.java
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.container.protect;
-
-import java.util.Timer;
-
-import com.yahoo.component.AbstractComponent;
-import com.yahoo.concurrent.ThreadLocalDirectory;
-import com.yahoo.container.core.DiagnosticsConfig;
-
-/**
- * Runs and initializes a {@link Watchdog} instance.
- *
- * @author Steinar Knutsen
- * @deprecated this is not in use and will be removed in the next major release
- */
-@Deprecated
-// TODO: Remove on Vespa 7
-public class FreezeDetector extends AbstractComponent {
-
- private final Timer timeoutWatchdog;
- private final Watchdog watchdog;
-
- public FreezeDetector(DiagnosticsConfig diagnosticsConfig) {
- timeoutWatchdog = null;
- watchdog = null;
- }
-
- public void register(ThreadLocalDirectory<TimeoutRate, Boolean> timeouts) {
- if (watchdog == null) {
- return;
- }
- watchdog.addTimeouts(timeouts);
- }
-
- public boolean isBreakdown() {
- if (watchdog == null) {
- return false;
- }
- return watchdog.isBreakdown();
- }
-
- public void unRegister(ThreadLocalDirectory<TimeoutRate, Boolean> timeouts) {
- if (watchdog == null) {
- return;
- }
- watchdog.removeTimeouts(timeouts);
- }
-
- @Override
- public void deconstruct() {
- super.deconstruct();
- if (timeoutWatchdog != null) {
- timeoutWatchdog.cancel();
- }
- }
-
-}