aboutsummaryrefslogtreecommitdiffstats
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.java42
1 files changed, 42 insertions, 0 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
new file mode 100644
index 00000000000..30e2df9acf9
--- /dev/null
+++ b/config-model-api/src/main/java/com/yahoo/config/model/api/ConfigChangeAction.java
@@ -0,0 +1,42 @@
+// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+package com.yahoo.config.model.api;
+
+import java.util.List;
+
+/**
+ * Contains the action to be performed on the given services to handle a config change
+ * between the current active model and the next model to prepare.
+ *
+ * @author geirst
+ * @since 5.40
+ */
+public interface ConfigChangeAction {
+
+ enum Type {
+ RESTART("restart"), REFEED("refeed");
+
+ private final String type;
+
+ Type(String type) {
+ this.type = type;
+ }
+
+ @Override
+ public String toString() {
+ return type;
+ }
+ }
+
+ /** Returns what type of action is required to handle this config change */
+ Type getType();
+
+ /** Returns a message describing the config change in detail */
+ String getMessage();
+
+ /** Returns the list of services where the action must be performed */
+ List<ServiceInfo> getServices();
+
+ /** Returns whether this change should be allowed */
+ boolean allowed();
+
+}