diff options
author | Håkon Hallingstad <hakon@oath.com> | 2018-12-06 14:38:57 +0100 |
---|---|---|
committer | Håkon Hallingstad <hakon@oath.com> | 2018-12-06 14:38:57 +0100 |
commit | 790f43668c9f6a1ed0e86cfec730a76c31666cf6 (patch) | |
tree | 1726ce9fae98dd7f2c533733d69f0458d96cf8af /config-model-api | |
parent | 0daac4e48cea934f1849d5be486c8506641214b6 (diff) |
Make service monitors aware of infra applications in duper model.
- Notify monitors of infrastructure application activation. Live-flipping the
content of the duper model is non-trivial and has been removed.
- Split out DuperModel as a simple mutable and thread-unsafe container of the
applications in the duper model, that also handles calls listeners on
changes. The previous DuperModel has been renamed to DuperModelManager.
- Replace SuperModelProvider::snapshot method (fast but difficult to use
right) with registerListener.
- Shorten the fully qualified package names by 1-2 levels for mosts classes.
Next steps:
- Make HA query the real orchestrator
- Start experimenting with health monitoring of infra apps
Diffstat (limited to 'config-model-api')
-rw-r--r-- | config-model-api/src/main/java/com/yahoo/config/model/api/SuperModelProvider.java | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/config-model-api/src/main/java/com/yahoo/config/model/api/SuperModelProvider.java b/config-model-api/src/main/java/com/yahoo/config/model/api/SuperModelProvider.java index ac578b98441..b33902cbfb5 100644 --- a/config-model-api/src/main/java/com/yahoo/config/model/api/SuperModelProvider.java +++ b/config-model-api/src/main/java/com/yahoo/config/model/api/SuperModelProvider.java @@ -2,13 +2,14 @@ package com.yahoo.config.model.api; public interface SuperModelProvider { - SuperModel getSuperModel(); - /** - * Returns the current SuperModel. All changes to the SuperModel - * following that snapshot will be published to the listener. Warning: The listener - * methods may have been invoked before (or concurrently with) this method returning. + * Synchronously call {@link SuperModelListener#applicationActivated(SuperModel, ApplicationInfo) + * listener.applicationActivated()} on all active applications, and register the listener for future changes + * to the super model. + * + * WARNING: The listener may be called asynchronously before the method returns. */ - SuperModel snapshot(SuperModelListener listener); + void registerListener(SuperModelListener listener); + SuperModel getSuperModel(); } |