diff options
author | liamfallon <liam.fallon@ericsson.com> | 2018-08-30 09:37:29 +0100 |
---|---|---|
committer | liamfallon <liam.fallon@ericsson.com> | 2018-08-31 19:23:41 +0100 |
commit | f32508381ce0b555fc14978cbaa458aa4e2d91c5 (patch) | |
tree | 1cab66e5372b6467f288ae1351ce836e4eba2d03 /plugins/plugins-context/plugins-context-distribution/plugins-context-distribution-infinispan/src/main/java | |
parent | 052038c7a7e0b385462b3b653b7d06094d472df3 (diff) |
Use parameter service in apex
Switch parameter handling in apex to use
the ONAP PF common parameter service
Change-Id: Id318d19c726b18b1a69c630fa81ca7d695355e9c
Issue-ID: POLICY-954
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
Diffstat (limited to 'plugins/plugins-context/plugins-context-distribution/plugins-context-distribution-infinispan/src/main/java')
2 files changed, 6 insertions, 8 deletions
diff --git a/plugins/plugins-context/plugins-context-distribution/plugins-context-distribution-infinispan/src/main/java/org/onap/policy/apex/plugins/context/distribution/infinispan/InfinispanContextDistributor.java b/plugins/plugins-context/plugins-context-distribution/plugins-context-distribution-infinispan/src/main/java/org/onap/policy/apex/plugins/context/distribution/infinispan/InfinispanContextDistributor.java index 9361d0b4c..d6a04dd7c 100644 --- a/plugins/plugins-context/plugins-context-distribution/plugins-context-distribution-infinispan/src/main/java/org/onap/policy/apex/plugins/context/distribution/infinispan/InfinispanContextDistributor.java +++ b/plugins/plugins-context/plugins-context-distribution/plugins-context-distribution-infinispan/src/main/java/org/onap/policy/apex/plugins/context/distribution/infinispan/InfinispanContextDistributor.java @@ -25,8 +25,9 @@ import java.util.Map; import org.infinispan.Cache; import org.onap.policy.apex.context.ContextException; import org.onap.policy.apex.context.impl.distribution.AbstractDistributor; +import org.onap.policy.apex.context.parameters.ContextParameterConstants; import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; -import org.onap.policy.apex.model.basicmodel.service.ParameterService; +import org.onap.policy.common.parameters.ParameterService; import org.slf4j.ext.XLogger; import org.slf4j.ext.XLoggerFactory; @@ -71,7 +72,7 @@ public class InfinispanContextDistributor extends AbstractDistributor { if (infinispanManager == null) { // Get the parameters from the parameter service final InfinispanDistributorParameters parameters = - ParameterService.getParameters(InfinispanDistributorParameters.class); + ParameterService.get(ContextParameterConstants.DISTRIBUTOR_GROUP_NAME); LOGGER.debug("initiating Infinispan with the parameters: " + parameters); diff --git a/plugins/plugins-context/plugins-context-distribution/plugins-context-distribution-infinispan/src/main/java/org/onap/policy/apex/plugins/context/distribution/infinispan/InfinispanDistributorParameters.java b/plugins/plugins-context/plugins-context-distribution/plugins-context-distribution-infinispan/src/main/java/org/onap/policy/apex/plugins/context/distribution/infinispan/InfinispanDistributorParameters.java index d73955224..539a732cf 100644 --- a/plugins/plugins-context/plugins-context-distribution/plugins-context-distribution-infinispan/src/main/java/org/onap/policy/apex/plugins/context/distribution/infinispan/InfinispanDistributorParameters.java +++ b/plugins/plugins-context/plugins-context-distribution/plugins-context-distribution-infinispan/src/main/java/org/onap/policy/apex/plugins/context/distribution/infinispan/InfinispanDistributorParameters.java @@ -21,7 +21,6 @@ package org.onap.policy.apex.plugins.context.distribution.infinispan; import org.onap.policy.apex.context.parameters.DistributorParameters; -import org.onap.policy.apex.model.basicmodel.service.ParameterService; /** * Distributor parameters for the Infinspan Distributor. @@ -30,9 +29,9 @@ import org.onap.policy.apex.model.basicmodel.service.ParameterService; */ public class InfinispanDistributorParameters extends DistributorParameters { // @formatter:off - + /** The default Infinispan configuration file location. */ - public static final String DEFAULT_INFINISPAN_DISTRIBUTION_CONFIG_FILE = "/infinispan/infinispan.xml"; + public static final String DEFAULT_INFINISPAN_DISTRIBUTION_CONFIG_FILE = "infinispan/infinispan.xml"; /** The default Infinispan jgroups configuration file location. */ public static final String DEFAULT_INFINISPAN_DISTRIBUTION_JGROUPS_FILE = null; @@ -54,9 +53,7 @@ public class InfinispanDistributorParameters extends DistributorParameters { * The Constructor. */ public InfinispanDistributorParameters() { - super(InfinispanDistributorParameters.class.getCanonicalName()); - ParameterService.registerParameters(InfinispanDistributorParameters.class, this); - ParameterService.registerParameters(DistributorParameters.class, this); + super(); } /** |