Remove Hazelcast cache for prefix resolver (CPS-2417 #2) 85/138985/3
authordanielhanrahan <daniel.hanrahan@est.tech>
Tue, 17 Sep 2024 16:48:22 +0000 (17:48 +0100)
committerDaniel Hanrahan <daniel.hanrahan@est.tech>
Tue, 24 Sep 2024 18:00:52 +0000 (18:00 +0000)
commit39e4eef51e44b73569fe82e214afab04edc5bba0
treedf876b07d19db3b6962ecd49456d6c2c8621f496
parentd8909ffdcc94cc617525f9dce857a1ebb2941b3b
Remove Hazelcast cache for prefix resolver (CPS-2417 #2)

This patch removes the AnchorDataCache from CPS, which is used for
prefix resolution in get/query operations.

As such, Hazelcast is no longer a dependency of CPS, only NCMP.

- Changed PrefixResolver to be more efficient.
- Removed AnchorDataCache and associated classes.
- Moved HazelcastCacheConfig to NCMP.
- Removed Hazelcast dependency from cps-service/pom.xml

This shows good performance improvements in some APIs such as v2 GET
which is nearly 2x faster (also 5x faster including base patch).

Issue-ID: CPS-2417
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: I24768469f24e90b70f7a6187faa4f5b3d75777d2
13 files changed:
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/cache/HazelcastCacheConfig.java [moved from cps-service/src/main/java/org/onap/cps/cache/HazelcastCacheConfig.java with 99% similarity]
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/cmnotificationsubscription/cache/CmSubscriptionConfig.java
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/inventory/sync/SynchronizationCacheConfig.java
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/inventory/trustlevel/TrustLevelCacheConfig.java
cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/impl/cache/HazelcastCacheConfigSpec.groovy [moved from cps-service/src/test/groovy/org/onap/cps/cache/HazelcastCacheConfigSpec.groovy with 99% similarity]
cps-service/pom.xml
cps-service/src/main/java/org/onap/cps/cache/AnchorDataCacheConfig.java [deleted file]
cps-service/src/main/java/org/onap/cps/cache/AnchorDataCacheEntry.java [deleted file]
cps-service/src/main/java/org/onap/cps/utils/PrefixResolver.java
cps-service/src/test/groovy/org/onap/cps/cache/AnchorDataCacheConfigSpec.groovy [deleted file]
cps-service/src/test/groovy/org/onap/cps/cache/AnchorDataCacheEntrySpec.groovy [deleted file]
cps-service/src/test/groovy/org/onap/cps/utils/PrefixResolverSpec.groovy
cps-service/src/test/resources/application.yml