aboutsummaryrefslogtreecommitdiffstats
path: root/music-rest/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'music-rest/src/main')
-rw-r--r--music-rest/src/main/java/org/onap/music/conductor/conditionals/MusicConditional.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/music-rest/src/main/java/org/onap/music/conductor/conditionals/MusicConditional.java b/music-rest/src/main/java/org/onap/music/conductor/conditionals/MusicConditional.java
index 18fa8a18..ebaa3a1f 100644
--- a/music-rest/src/main/java/org/onap/music/conductor/conditionals/MusicConditional.java
+++ b/music-rest/src/main/java/org/onap/music/conductor/conditionals/MusicConditional.java
@@ -94,9 +94,9 @@ public class MusicConditional {
String key = keyspace + "." + tablename + "." + primaryKey;
String lockId;
try {
- lockId = MusicCore.createLockReference(key);
+ lockId = MusicCore.createLockReferenceAtomic(key);
} catch (MusicLockingException e) {
- return new ReturnType(ResultType.FAILURE, e.getMessage());
+ return new ReturnType(ResultType.FAILURE, e.getMessage());
}
long leasePeriod = MusicUtil.getDefaultLockLeasePeriod();
ReturnType lockAcqResult = MusicCore.acquireLockWithLease(key, lockId, leasePeriod);
@@ -169,7 +169,7 @@ public class MusicConditional {
throws MusicLockingException, MusicQueryException, MusicServiceException {
String key = dataObj.getKeyspace() + "." + dataObj.getTableName() + "." + dataObj.getPrimaryKeyValue();
- String lockId = MusicCore.createLockReference(key);
+ String lockId = MusicCore.createLockReferenceAtomic(key);
long leasePeriod = MusicUtil.getDefaultLockLeasePeriod();
ReturnType lockAcqResult = MusicCore.acquireLockWithLease(key, lockId, leasePeriod);