summaryrefslogtreecommitdiffstats
path: root/orchestrator/src/main
diff options
context:
space:
mode:
authorJon Marius Venstad <venstad@gmail.com>2019-02-08 13:16:00 +0100
committerJon Marius Venstad <venstad@gmail.com>2019-02-08 13:16:00 +0100
commit303deeccfef4b0733d7ae8549b9db4262fa512fd (patch)
treeb331ff6efe9b7f948d85e182ba212e017ae07986 /orchestrator/src/main
parent2a2dde55b7f784b5f5ece703be5f3b84d8c1bf92 (diff)
Replace test usage of InMemoryStatusService
Diffstat (limited to 'orchestrator/src/main')
-rw-r--r--orchestrator/src/main/java/com/yahoo/vespa/orchestrator/status/StatusService.java19
1 files changed, 14 insertions, 5 deletions
diff --git a/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/status/StatusService.java b/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/status/StatusService.java
index 99f6c113193..c9e846906e3 100644
--- a/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/status/StatusService.java
+++ b/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/status/StatusService.java
@@ -2,18 +2,18 @@
package com.yahoo.vespa.orchestrator.status;
import com.yahoo.vespa.applicationmodel.ApplicationInstanceReference;
+import com.yahoo.vespa.applicationmodel.HostName;
import com.yahoo.vespa.orchestrator.OrchestratorContext;
import java.util.Set;
+import java.util.function.Function;
/**
- * Service that can produce registries for the suspension of an application
- * and its hosts.
+ * Service that can produce registries for the suspension of an application and its hosts.
*
- * The registry classes are pr application instance.
- * TODO Remove readonly registry class (replace with actual methods) - only adds complexity.
+ * The registry class is per locked application instance.
*
- * @author oyving
+ * @author Øyvind Grønnesby
* @author Tony Vaagenes
* @author smorgrav
*/
@@ -64,4 +64,13 @@ public interface StatusService {
* @return A Map between the application instance and its status.
*/
Set<ApplicationInstanceReference> getAllSuspendedApplications();
+
+ /**
+ * Returns a not necessarily consistent mapping from applications to their set of suspended hosts.
+ *
+ * If the lock for an application is held when this is acquired, the view of that application's hosts
+ * is consistent and up to date for as long as the lock is held.
+ */
+ Function<ApplicationInstanceReference, Set<HostName>> getSuspendedHostsByApplication();
+
}