aboutsummaryrefslogtreecommitdiffstats
path: root/config/src/main/java/com/yahoo/config/subscription/impl/GenericJRTConfigSubscription.java
diff options
context:
space:
mode:
Diffstat (limited to 'config/src/main/java/com/yahoo/config/subscription/impl/GenericJRTConfigSubscription.java')
-rw-r--r--config/src/main/java/com/yahoo/config/subscription/impl/GenericJRTConfigSubscription.java31
1 files changed, 20 insertions, 11 deletions
diff --git a/config/src/main/java/com/yahoo/config/subscription/impl/GenericJRTConfigSubscription.java b/config/src/main/java/com/yahoo/config/subscription/impl/GenericJRTConfigSubscription.java
index 068b24cdf1a..ab53ce6dc50 100644
--- a/config/src/main/java/com/yahoo/config/subscription/impl/GenericJRTConfigSubscription.java
+++ b/config/src/main/java/com/yahoo/config/subscription/impl/GenericJRTConfigSubscription.java
@@ -3,6 +3,7 @@ package com.yahoo.config.subscription.impl;
import java.util.List;
+import com.yahoo.config.ConfigInstance;
import com.yahoo.config.subscription.ConfigSource;
import com.yahoo.config.subscription.ConfigSubscriber;
import com.yahoo.log.LogLevel;
@@ -18,22 +19,27 @@ import com.yahoo.vespa.config.protocol.JRTClientConfigRequest;
* @author vegardh
*
*/
-public class GenericJRTConfigSubscription extends JRTConfigSubscription<RawConfig> {
+@SuppressWarnings("rawtypes")
+public class GenericJRTConfigSubscription extends JRTConfigSubscription {
+ private RawConfig config;
private final List<String> defContent;
- public GenericJRTConfigSubscription(ConfigKey<RawConfig> key, List<String> defContent, ConfigSubscriber subscriber,
- ConfigSource source, TimingValues timingValues)
- {
+ @SuppressWarnings("unchecked")
+ public GenericJRTConfigSubscription(ConfigKey<?> key,
+ List<String> defContent,
+ ConfigSubscriber subscriber,
+ ConfigSource source,
+ TimingValues timingValues) {
super(key, subscriber, source, timingValues);
this.defContent = defContent;
}
@Override
protected void setNewConfig(JRTClientConfigRequest jrtReq) {
- setConfig(jrtReq.getNewGeneration(), RawConfig.createFromResponseParameters(jrtReq) );
+ this.config = RawConfig.createFromResponseParameters(jrtReq);
if (log.isLoggable(LogLevel.DEBUG)) {
- log.log(LogLevel.DEBUG, "in setNewConfig, config=" + this.getConfigState().getConfig());
+ log.log(LogLevel.DEBUG, "in setNewConfig, config=" + this.config);
}
}
@@ -42,15 +48,13 @@ public class GenericJRTConfigSubscription extends JRTConfigSubscription<RawConfi
@Override
void setGeneration(Long generation) {
super.setGeneration(generation);
- ConfigState<RawConfig> configState = getConfigState();
-
- if (configState.getConfig() != null) {
- configState.getConfig().setGeneration(generation);
+ if (this.config != null) {
+ this.config.setGeneration(generation);
}
}
public RawConfig getRawConfig() {
- return getConfigState().getConfig();
+ return config;
}
/**
@@ -62,4 +66,9 @@ public class GenericJRTConfigSubscription extends JRTConfigSubscription<RawConfi
public DefContent getDefContent() {
return (DefContent.fromList(defContent));
}
+
+ @Override
+ public ConfigInstance getConfig() {
+ return null;
+ }
}