aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/org/onap/music/rest
diff options
context:
space:
mode:
authorThomas Nelson <nelson24@att.com>2019-09-17 13:32:00 +0000
committerGerrit Code Review <gerrit@onap.org>2019-09-17 13:32:00 +0000
commit0288a09ff1ac4429ee83a4f791c5271d20cbd0dc (patch)
tree0f1e967ebe19e2528ac0a26f46c6585e93cf22a5 /src/main/java/org/onap/music/rest
parent08a17c93ecd50971172026dafb5456f41040ea1a (diff)
parentea39a71e28f2772da7d467a410d43a7ddd8d163d (diff)
Merge "Deadlock detection by owner"
Diffstat (limited to 'src/main/java/org/onap/music/rest')
-rw-r--r--src/main/java/org/onap/music/rest/RestMusicLocksAPI.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/org/onap/music/rest/RestMusicLocksAPI.java b/src/main/java/org/onap/music/rest/RestMusicLocksAPI.java
index 5ce0f424..b839c7f2 100644
--- a/src/main/java/org/onap/music/rest/RestMusicLocksAPI.java
+++ b/src/main/java/org/onap/music/rest/RestMusicLocksAPI.java
@@ -116,6 +116,7 @@ public class RestMusicLocksAPI {
@ApiParam(value = "Authorization", required = true) @HeaderParam(MusicUtil.AUTHORIZATION) String authorization,
@ApiParam(value = "AID", required = false, hidden = true) @HeaderParam("aid") String aid,
JsonLock lockObject,
+ @ApiParam(value = "Lock Owner", required = false) @HeaderParam("owner") String owner,
@ApiParam(value = "Application namespace",
required = false, hidden = true) @HeaderParam("ns") String ns) throws Exception{
try {
@@ -136,7 +137,7 @@ public class RestMusicLocksAPI {
}
String lockId;
try {
- lockId= MusicCore.createLockReference(lockName, locktype);
+ lockId= MusicCore.createLockReference(lockName, locktype, owner);
} catch (MusicLockingException e) {
return response.status(Status.BAD_REQUEST).entity(new JsonResponse(ResultType.FAILURE).setError(e.getMessage()).toMap()).build();
}