Cps and Ncmp distributed lock for various use cases 83/139583/13
authormpriyank <priyank.maheshwari@est.tech>
Wed, 27 Nov 2024 14:43:28 +0000 (14:43 +0000)
committermpriyank <priyank.maheshwari@est.tech>
Thu, 19 Dec 2024 15:38:36 +0000 (15:38 +0000)
commita7206655a004659bd1251c70db0acfd0f58e40d4
tree852a2331753c722e46c03ac6b508a14b646f24e1
parent40578d56733247540a09b6bbf000181b46b5c1fc
Cps and Ncmp distributed lock for various use cases

- introduced cpsAndNcmpLock to be used for any use case needing
  coordination. Since it can be used for any use case hence placing the
  class accordingly.
- currently lock is being used for populating workQueue.
- Removed FencedLock as it was part of CPSubsystem which is moved to
  hazelcast-enterprise in 5.5.* version onwards.
- added info level logging statement to verify just one thread at a time
  in the critical section
- Note : integration test to be part of a separate patch.

Issue-ID: CPS-2479
Change-Id: I0f33c7232786c517383e5093fda91fd9a1839021
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/cache/CpsAndNcmpLockConfig.java [new file with mode: 0644]
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/inventory/sync/ModuleSyncWatchdog.java
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/inventory/sync/SynchronizationCacheConfig.java
cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/impl/inventory/sync/ModuleSyncWatchdogSpec.groovy
integration-test/src/test/groovy/org/onap/cps/integration/base/CpsIntegrationSpecBase.groovy
integration-test/src/test/groovy/org/onap/cps/integration/functional/ncmp/ModuleSyncWatchdogIntegrationSpec.groovy