aboutsummaryrefslogtreecommitdiffstats
path: root/container-disc
diff options
context:
space:
mode:
authorHarald Musum <musum@verizonmedia.com>2019-09-02 12:53:22 +0200
committerHarald Musum <musum@verizonmedia.com>2019-09-02 12:53:22 +0200
commit11c1c0f4ca0b43f49b227c0e8061d8128cd303d5 (patch)
tree53ff025622b3ffc3b58bc02adc132c168d6fc4c6 /container-disc
parentac1ed8ae40b48c85e3f44d8fa3ef8a0070fffc11 (diff)
Shutdown configurere, add some comments
Diffstat (limited to 'container-disc')
-rw-r--r--container-disc/src/main/java/com/yahoo/container/jdisc/ConfiguredApplication.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/container-disc/src/main/java/com/yahoo/container/jdisc/ConfiguredApplication.java b/container-disc/src/main/java/com/yahoo/container/jdisc/ConfiguredApplication.java
index b8dd46d273a..ab8162b9ae0 100644
--- a/container-disc/src/main/java/com/yahoo/container/jdisc/ConfiguredApplication.java
+++ b/container-disc/src/main/java/com/yahoo/container/jdisc/ConfiguredApplication.java
@@ -82,6 +82,9 @@ public final class ConfiguredApplication implements Application {
private final String configId;
private final OsgiFramework osgiFramework;
private final com.yahoo.jdisc.Timer timerSingleton;
+ // Subscriber that is used when this is not a standalone-container. Subscribes
+ // to config to make sure that container will be registered in slobrok (by {@link com.yahoo.jrt.slobrok.api.Register})
+ // if slobrok config changes (typically slobroks moving to other nodes)
private final Optional<SlobrokConfigSubscriber> slobrokConfigSubscriber;
private final SessionCache sessionCache;
@@ -110,7 +113,7 @@ public final class ConfiguredApplication implements Application {
}
/**
- * Do not delete this method even if its empty.
+ * Do not delete this method even if it's empty.
* Calling this methods forces this class to be loaded,
* which runs the static block.
*/
@@ -153,7 +156,7 @@ public final class ConfiguredApplication implements Application {
}
/**
- * The container has no rpc methods, but we still need an RPC sever
+ * The container has no RPC methods, but we still need an RPC sever
* to register in Slobrok to enable orchestration
*/
private Register registerInSlobrok(QrConfig qrConfig) {
@@ -360,6 +363,7 @@ public final class ConfiguredApplication implements Application {
log.info("Stop: Shutting container down");
configurer.shutdown(new Deconstructor(false));
+ slobrokConfigSubscriber.ifPresent(SlobrokConfigSubscriber::shutdown);
Container.get().shutdown();
unregisterInSlobrok();