summaryrefslogtreecommitdiffstats
path: root/feature-pooling-dmaap/src/main
diff options
context:
space:
mode:
authorLiam Fallon <liam.fallon@ericsson.com>2018-06-19 21:09:34 +0000
committerGerrit Code Review <gerrit@onap.org>2018-06-19 21:09:34 +0000
commitcea49f658fe6eb93c6d9d8fd1049f2fcb77b1ac4 (patch)
tree1376b517fbdd6dc456fa2684f0aab3edd46ca794 /feature-pooling-dmaap/src/main
parenteb5d536f169528a6e86c03feb4c2b21743936f34 (diff)
parentfd7593078cddbed63a8c68bc8f6352283a3fb849 (diff)
Merge "Add setXxx methods for @Property annotation"
Diffstat (limited to 'feature-pooling-dmaap/src/main')
-rw-r--r--feature-pooling-dmaap/src/main/java/org/onap/policy/drools/pooling/PoolingFeature.java4
-rw-r--r--feature-pooling-dmaap/src/main/java/org/onap/policy/drools/pooling/PoolingProperties.java43
2 files changed, 45 insertions, 2 deletions
diff --git a/feature-pooling-dmaap/src/main/java/org/onap/policy/drools/pooling/PoolingFeature.java b/feature-pooling-dmaap/src/main/java/org/onap/policy/drools/pooling/PoolingFeature.java
index 67cb21ee..d42b8de1 100644
--- a/feature-pooling-dmaap/src/main/java/org/onap/policy/drools/pooling/PoolingFeature.java
+++ b/feature-pooling-dmaap/src/main/java/org/onap/policy/drools/pooling/PoolingFeature.java
@@ -149,7 +149,9 @@ public class PoolingFeature implements PolicyEngineFeatureAPI, PolicyControllerF
String name = controller.getName();
- if (FeatureEnabledChecker.isFeatureEnabled(featProps, name, PoolingProperties.FEATURE_ENABLED)) {
+ SpecProperties specProps = new SpecProperties(PoolingProperties.PREFIX, name, featProps);
+
+ if (FeatureEnabledChecker.isFeatureEnabled(specProps, PoolingProperties.FEATURE_ENABLED)) {
try {
// get & validate the properties
PoolingProperties props = new PoolingProperties(name, featProps);
diff --git a/feature-pooling-dmaap/src/main/java/org/onap/policy/drools/pooling/PoolingProperties.java b/feature-pooling-dmaap/src/main/java/org/onap/policy/drools/pooling/PoolingProperties.java
index 54319423..ad118727 100644
--- a/feature-pooling-dmaap/src/main/java/org/onap/policy/drools/pooling/PoolingProperties.java
+++ b/feature-pooling-dmaap/src/main/java/org/onap/policy/drools/pooling/PoolingProperties.java
@@ -38,6 +38,12 @@ public class PoolingProperties extends SpecPropertyConfiguration {
* Feature properties all begin with this prefix.
*/
public static final String PREFIX = "pooling.";
+
+ /*
+ * These properties are not used by a SpecPropertyConfiguration, thus
+ * they do not use any of the "{xxx}" forms.
+ */
+ public static final String FEATURE_ENABLED = PREFIX + "enabled";
/*
* These properties REQUIRE a controller name, thus they use the "{$}" form.
@@ -48,7 +54,6 @@ public class PoolingProperties extends SpecPropertyConfiguration {
* These properties allow the controller name to be left out, thus they use
* the "{prefix?suffix}" form.
*/
- public static final String FEATURE_ENABLED = PREFIX + "{?.}enabled";
public static final String OFFLINE_LIMIT = PREFIX + "{?.}offline.queue.limit";
public static final String OFFLINE_AGE_MS = PREFIX + "{?.}offline.queue.age.milliseconds";
public static final String OFFLINE_PUB_WAIT_MS = PREFIX + "{?.}offline.publish.wait.milliseconds";
@@ -186,4 +191,40 @@ public class PoolingProperties extends SpecPropertyConfiguration {
public long getInterHeartbeatMs() {
return interHeartbeatMs;
}
+
+ public void setPoolingTopic(String poolingTopic) {
+ this.poolingTopic = poolingTopic;
+ }
+
+ public void setOfflineLimit(int offlineLimit) {
+ this.offlineLimit = offlineLimit;
+ }
+
+ public void setOfflineAgeMs(long offlineAgeMs) {
+ this.offlineAgeMs = offlineAgeMs;
+ }
+
+ public void setOfflinePubWaitMs(long offlinePubWaitMs) {
+ this.offlinePubWaitMs = offlinePubWaitMs;
+ }
+
+ public void setStartHeartbeatMs(long startHeartbeatMs) {
+ this.startHeartbeatMs = startHeartbeatMs;
+ }
+
+ public void setReactivateMs(long reactivateMs) {
+ this.reactivateMs = reactivateMs;
+ }
+
+ public void setIdentificationMs(long identificationMs) {
+ this.identificationMs = identificationMs;
+ }
+
+ public void setActiveHeartbeatMs(long activeHeartbeatMs) {
+ this.activeHeartbeatMs = activeHeartbeatMs;
+ }
+
+ public void setInterHeartbeatMs(long interHeartbeatMs) {
+ this.interHeartbeatMs = interHeartbeatMs;
+ }
}