Merge "Update documentation related to hazelcast"
diff --git a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/cache/HazelcastCacheConfig.java b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/cache/HazelcastCacheConfig.java
index ad8025b..109a541 100644
--- a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/cache/HazelcastCacheConfig.java
+++ b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/cache/HazelcastCacheConfig.java
@@ -57,13 +57,13 @@
final Config config = getHazelcastInstanceConfig(instanceConfigName);
config.setClusterName(clusterName);
config.setClassLoader(org.onap.cps.spi.model.Dataspace.class.getClassLoader());
- dataStructuresConfig(namedConfig, config);
+ configureDataStructures(namedConfig, config);
exposeClusterInformation(config);
updateDiscoveryMode(config);
return config;
}
- private static void dataStructuresConfig(final NamedConfig namedConfig, final Config config) {
+ private static void configureDataStructures(final NamedConfig namedConfig, final Config config) {
if (namedConfig instanceof MapConfig) {
config.addMapConfig((MapConfig) namedConfig);
}
diff --git a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/impl/cache/HazelcastCacheConfigSpec.groovy b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/impl/cache/HazelcastCacheConfigSpec.groovy
index dc38e0f..0bd8384 100644
--- a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/impl/cache/HazelcastCacheConfigSpec.groovy
+++ b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/impl/cache/HazelcastCacheConfigSpec.groovy
@@ -29,10 +29,10 @@
def objectUnderTest = new HazelcastCacheConfig()
def 'Create Hazelcast instance with a #scenario'() {
- given: 'a cluster name and instance name'
+ given: 'a cluster name and instance config name'
objectUnderTest.clusterName = 'my cluster'
objectUnderTest.instanceConfigName = 'my instance config'
- when: 'an hazelcast instance is created (name has to be unique)'
+ when: 'a hazelcast instance is created (name has to be unique)'
def result = objectUnderTest.getOrCreateHazelcastInstance(config)
then: 'the instance is created and has the correct name'
assert result.name == 'my instance config'
diff --git a/docs/deployment.rst b/docs/deployment.rst
index e57acf1..9d41af5 100644
--- a/docs/deployment.rst
+++ b/docs/deployment.rst
@@ -331,16 +331,15 @@
.. Below Label is used by documentation for other CPS components to link here, do not remove even if it gives a warning
.. _cps_common_distributed_datastructures:
-CPS-Core and NCMP Distributed Datastructures
-============================================
+NCMP Distributed Data Structures
+================================
-CPS-Core and NCMP both internally uses embedded distributed datastructure to replicate the state across various instances for low latency.
-These instances require some additional ports to be available. The default range starts from 5701 and based on the number of instances configured they are incremented sequentially.
+NCMP utilizes embedded distributed data structures to replicate state across various instances, ensuring low latency and high performance. Each JVM runs a Hazelcast instance to manage these data structures. To facilitate member visibility and cluster formation, an additional port (defaulting to 5701) must be available.
Below are the list of distributed datastructures that we have.
+--------------+------------------------------------+-----------------------------------------------------------+
-| Component | Datastructure name | Use |
+| Component | Data Structure Name | Use |
+==============+====================================+===========================================================+
| cps-ncmp | moduleSyncStartedOnCmHandles | Watchdog process to register cm handles. |
+--------------+------------------------------------+-----------------------------------------------------------+
@@ -348,13 +347,11 @@
+--------------+------------------------------------+-----------------------------------------------------------+
| cps-ncmp | moduleSyncWorkQueue | Queue used internally for workers to pick the task. |
+--------------+------------------------------------+-----------------------------------------------------------+
-| cps-ncmp | untrustworthyCmHandlesSet | Stores untrustworthy cm handles whose trust level is NONE.|
+| cps-ncmp | trustLevelPerCmHandle | Stores the trust level per cm handle id |
+--------------+------------------------------------+-----------------------------------------------------------+
| cps-ncmp | trustLevelPerDmiPlugin | Stores the trust level for the dmi-plugins. |
+--------------+------------------------------------+-----------------------------------------------------------+
-| cps-ncmp | moduleSetTagCacheMapConfig | Stores the module set tags for cm handles. |
-+--------------+------------------------------------+-----------------------------------------------------------+
| cps-ncmp | cmNotificationSubscriptionCache | Stores and tracks cm notification subscription requests. |
+--------------+------------------------------------+-----------------------------------------------------------+
-Total number of caches : 8
+Total number of caches : 6
\ No newline at end of file
diff --git a/docs/release-notes.rst b/docs/release-notes.rst
index cebb1c0..9c08356 100644
--- a/docs/release-notes.rst
+++ b/docs/release-notes.rst
@@ -43,6 +43,7 @@
Features
--------
3.5.4
+ - `CPS-2408 <https://lf-onap.atlassian.net/browse/CPS-2408>`_ One Hazelcast instance per JVM to manage the distributed data structures.
Version: 3.5.3
==============