summaryrefslogtreecommitdiffstats
path: root/config-model-api
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@gmail.com>2020-10-09 14:37:58 +0200
committerJon Bratseth <bratseth@gmail.com>2020-10-09 14:37:58 +0200
commit4e6f7776fee9461dc8c7e4364b774c04916f99d4 (patch)
tree93dbb0188599ecb24286c6222a2a27d0a47aa1b0 /config-model-api
parent2e3515a187d0b3aae7ae1afd2708f011b9b8bf22 (diff)
Signal deference of config change application until restart
When a restart needs to be done, processes should not apply new config until restarted. This signals to clusters in the config model when this obtains, but this is a no-op for now.
Diffstat (limited to 'config-model-api')
-rw-r--r--config-model-api/src/main/java/com/yahoo/config/application/api/FileRegistry.java1
-rw-r--r--config-model-api/src/main/java/com/yahoo/config/model/api/ConfigChangeAction.java7
2 files changed, 7 insertions, 1 deletions
diff --git a/config-model-api/src/main/java/com/yahoo/config/application/api/FileRegistry.java b/config-model-api/src/main/java/com/yahoo/config/application/api/FileRegistry.java
index 0d4c0ad76eb..8415781b827 100644
--- a/config-model-api/src/main/java/com/yahoo/config/application/api/FileRegistry.java
+++ b/config-model-api/src/main/java/com/yahoo/config/application/api/FileRegistry.java
@@ -11,7 +11,6 @@ import com.yahoo.config.FileReference;
*/
public interface FileRegistry {
-
FileReference addFile(String relativePath);
FileReference addUri(String uri);
default FileReference addApplicationPackage() { return addFile(""); }
diff --git a/config-model-api/src/main/java/com/yahoo/config/model/api/ConfigChangeAction.java b/config-model-api/src/main/java/com/yahoo/config/model/api/ConfigChangeAction.java
index 2a798839752..ffe011af1e8 100644
--- a/config-model-api/src/main/java/com/yahoo/config/model/api/ConfigChangeAction.java
+++ b/config-model-api/src/main/java/com/yahoo/config/model/api/ConfigChangeAction.java
@@ -1,7 +1,10 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.config.model.api;
+import com.yahoo.config.provision.ClusterSpec;
+
import java.util.List;
+import java.util.Optional;
/**
* Contains the action to be performed on the given services to handle a config change
@@ -38,6 +41,10 @@ public interface ConfigChangeAction {
/** Returns whether this change should be allowed */
boolean allowed();
+ /** The id of the cluster that needs this action applied */
+ // TODO: Remove this default implementation after October 2020
+ default ClusterSpec.Id clusterId() { return null; }
+
/** Returns whether this change should be ignored for internal redeploy */
default boolean ignoreForInternalRedeploy() {
return false;