summaryrefslogtreecommitdiffstats
path: root/config-model-api/src/main/java/com/yahoo/config/model/api/SuperModelListener.java
diff options
context:
space:
mode:
authorHåkon Hallingstad <hakon@verizonmedia.com>2020-02-23 18:11:44 +0100
committerHåkon Hallingstad <hakon@verizonmedia.com>2020-02-23 18:11:44 +0100
commit988131792a9bf0cd22072622ec3ffd2d62efa62d (patch)
tree4e2f0e4a2c6638cc12a4ac3d3145f85bb745bebc /config-model-api/src/main/java/com/yahoo/config/model/api/SuperModelListener.java
parent465e0e5ab20337d9f8023cb0371c57927be06ff6 (diff)
Define completeness of SuperModel and DuperModel
In order for Orchestrator to remove application data from ZooKeeper, it must know which applications do NOT exist. Since the duper model starts with 0 applications, always, the only way of knowing what applications do not exist is for the bootstrap code to notify the super model/duper model when bootstrap is complete. There are 2 sources of applications that must signal completeness: - The super model, once all applications have been redeployed in ConfigServerBootstrap. - The infrastructure application, in the InfrastructureProvisioner the first time it runs.
Diffstat (limited to 'config-model-api/src/main/java/com/yahoo/config/model/api/SuperModelListener.java')
-rw-r--r--config-model-api/src/main/java/com/yahoo/config/model/api/SuperModelListener.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/config-model-api/src/main/java/com/yahoo/config/model/api/SuperModelListener.java b/config-model-api/src/main/java/com/yahoo/config/model/api/SuperModelListener.java
index 497c38af908..e66a7e1ef7e 100644
--- a/config-model-api/src/main/java/com/yahoo/config/model/api/SuperModelListener.java
+++ b/config-model-api/src/main/java/com/yahoo/config/model/api/SuperModelListener.java
@@ -17,4 +17,12 @@ public interface SuperModelListener {
* Application has been removed.
*/
void applicationRemoved(SuperModel superModel, ApplicationId id);
+
+ /**
+ * Invoked once all applications that were supposed to be deployed on bootstrap
+ * have been activated (and the respective {@link #applicationActivated(SuperModel, ApplicationInfo)
+ * applicationActivated} have been invoked). The SuperModel is then said to be "complete".
+ * @param superModel
+ */
+ void notifyOfCompleteness(SuperModel superModel);
}