aboutsummaryrefslogtreecommitdiffstats
path: root/cps-service/src/main/java/org/onap
diff options
context:
space:
mode:
Diffstat (limited to 'cps-service/src/main/java/org/onap')
-rw-r--r--cps-service/src/main/java/org/onap/cps/cache/AnchorDataCacheConfig.java3
-rw-r--r--cps-service/src/main/java/org/onap/cps/cache/HazelcastCacheConfig.java10
2 files changed, 7 insertions, 6 deletions
diff --git a/cps-service/src/main/java/org/onap/cps/cache/AnchorDataCacheConfig.java b/cps-service/src/main/java/org/onap/cps/cache/AnchorDataCacheConfig.java
index 5ee6b3804e..efe19c6cb7 100644
--- a/cps-service/src/main/java/org/onap/cps/cache/AnchorDataCacheConfig.java
+++ b/cps-service/src/main/java/org/onap/cps/cache/AnchorDataCacheConfig.java
@@ -40,7 +40,6 @@ public class AnchorDataCacheConfig extends HazelcastCacheConfig {
*/
@Bean
public IMap<String, AnchorDataCacheEntry> anchorDataCache() {
- return createHazelcastInstance("hazelCastInstanceCpsCore", anchorDataCacheMapConfig, "cps-service-caches")
- .getMap("anchorDataCache");
+ return createHazelcastInstance("hazelCastInstanceCpsCore", anchorDataCacheMapConfig).getMap("anchorDataCache");
}
}
diff --git a/cps-service/src/main/java/org/onap/cps/cache/HazelcastCacheConfig.java b/cps-service/src/main/java/org/onap/cps/cache/HazelcastCacheConfig.java
index 4aebceae0a..405e6e2a88 100644
--- a/cps-service/src/main/java/org/onap/cps/cache/HazelcastCacheConfig.java
+++ b/cps-service/src/main/java/org/onap/cps/cache/HazelcastCacheConfig.java
@@ -35,6 +35,9 @@ import org.springframework.beans.factory.annotation.Value;
@Slf4j
public class HazelcastCacheConfig {
+ @Value("${hazelcast.cluster-name}")
+ protected String clusterName;
+
@Value("${hazelcast.mode.kubernetes.enabled}")
protected boolean cacheKubernetesEnabled;
@@ -42,12 +45,11 @@ public class HazelcastCacheConfig {
protected String cacheKubernetesServiceName;
protected HazelcastInstance createHazelcastInstance(final String hazelcastInstanceName,
- final NamedConfig namedConfig, final String clusterName) {
- return Hazelcast.newHazelcastInstance(initializeConfig(hazelcastInstanceName, namedConfig, clusterName));
+ final NamedConfig namedConfig) {
+ return Hazelcast.newHazelcastInstance(initializeConfig(hazelcastInstanceName, namedConfig));
}
- private Config initializeConfig(final String instanceName, final NamedConfig namedConfig,
- final String clusterName) {
+ private Config initializeConfig(final String instanceName, final NamedConfig namedConfig) {
final Config config = new Config(instanceName);
if (namedConfig instanceof MapConfig) {
config.addMapConfig((MapConfig) namedConfig);