summaryrefslogtreecommitdiffstats
path: root/config-model-api/src/main/java/com/yahoo/config/model/api/ConfigChangeAction.java
diff options
context:
space:
mode:
Diffstat (limited to 'config-model-api/src/main/java/com/yahoo/config/model/api/ConfigChangeAction.java')
-rw-r--r--config-model-api/src/main/java/com/yahoo/config/model/api/ConfigChangeAction.java10
1 files changed, 6 insertions, 4 deletions
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 f8f0a3dfb1a..70a54918216 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
@@ -5,6 +5,7 @@ import com.yahoo.config.application.api.ValidationId;
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,12 +39,13 @@ public interface ConfigChangeAction {
/** Returns the list of services where the action must be performed */
List<ServiceInfo> getServices();
- /**
- * Returns whether this change should be allowed.
- * Implementations which allow this to return false should inherit {@link DisallowableConfigChangeAction}
- */
+ /** Returns whether this change should be allowed. */
+ // TODO jonmv: remove in 2021.
boolean allowed();
+ /** When this is non-empty, validation may fail unless this validation id is allowed by validation overrides. */
+ default Optional<ValidationId> validationId() { return Optional.empty(); }
+
/** The id of the cluster that needs this action applied */
// TODO: Remove this default implementation after October 2020
default ClusterSpec.Id clusterId() { return null; }