aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTschaen, Brendan <ctschaen@att.com>2018-12-03 15:21:30 -0500
committerTschaen, Brendan <ctschaen@att.com>2018-12-03 17:27:06 -0500
commit24c82cbc9ccdcfab25b304bc4c1660dca304bdb9 (patch)
tree7c0fc8306d28470d6e8b86033c8131b23f1c0cec
parent2cf0f8dfe0ac7e147614fcf6d0265c0ab64e9326 (diff)
Cassa lockstore return string for peekLock
Change-Id: I4384ed522e7849ba9ca355efa63a08512f11ccec Issue-ID: MUSIC-222 Signed-off-by: Tschaen, Brendan <ctschaen@att.com>
-rw-r--r--src/main/java/org/onap/music/lockingservice/cassandra/CassaLockStore.java12
-rw-r--r--src/main/java/org/onap/music/service/impl/MusicCassaCore.java2
2 files changed, 6 insertions, 8 deletions
diff --git a/src/main/java/org/onap/music/lockingservice/cassandra/CassaLockStore.java b/src/main/java/org/onap/music/lockingservice/cassandra/CassaLockStore.java
index 68423699..9b5793fa 100644
--- a/src/main/java/org/onap/music/lockingservice/cassandra/CassaLockStore.java
+++ b/src/main/java/org/onap/music/lockingservice/cassandra/CassaLockStore.java
@@ -167,16 +167,14 @@ public class CassaLockStore {
PreparedQueryObject queryObject = new PreparedQueryObject();
queryObject.appendQueryString(selectQuery);
ResultSet rs = dsHandle.executeOneConsistencyGet(queryObject);
- System.err.println(rs);
-
return rs.one().getLong("count");
}
-
-
+
+
/**
- * This method returns the top of lock table/queue for the key.
- * @param keyspace of the application.
- * @param table of the application.
+ * This method returns the top of lock table/queue for the key.
+ * @param keyspace of the application.
+ * @param table of the application.
* @param key is the primary key of the application table
* @return the UUID lock reference.
* @throws MusicServiceException
diff --git a/src/main/java/org/onap/music/service/impl/MusicCassaCore.java b/src/main/java/org/onap/music/service/impl/MusicCassaCore.java
index a7a6a5ab..9bbb3a9a 100644
--- a/src/main/java/org/onap/music/service/impl/MusicCassaCore.java
+++ b/src/main/java/org/onap/music/service/impl/MusicCassaCore.java
@@ -327,7 +327,7 @@ public class MusicCassaCore implements MusicCoreService {
String table = splitString[1];
String primaryKeyValue = splitString[2];
try {
- return getLockingServiceHandle().peekLockQueue(keyspace, table, primaryKeyValue)+"";
+ return getLockingServiceHandle().peekLockQueue(keyspace, table, primaryKeyValue).lockRef;
} catch (MusicLockingException | MusicServiceException | MusicQueryException e) {
logger.error(EELFLoggerDelegate.errorLogger,e.getMessage(), AppMessages.LOCKINGERROR+fullyQualifiedKey ,ErrorSeverity.CRITICAL, ErrorTypes.LOCKINGERROR);
}