diff options
Diffstat (limited to 'feature-pooling-dmaap/src/main/java/org/onap')
-rw-r--r-- | feature-pooling-dmaap/src/main/java/org/onap/policy/drools/pooling/PoolingFeature.java | 4 | ||||
-rw-r--r-- | feature-pooling-dmaap/src/main/java/org/onap/policy/drools/pooling/PoolingProperties.java | 43 |
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; + } } |