diff options
author | Arthur Martella <arthur.martella.1@att.com> | 2019-09-13 15:59:26 -0400 |
---|---|---|
committer | Arthur Martella <arthur.martella.1@att.com> | 2019-09-16 14:24:40 -0400 |
commit | ea39a71e28f2772da7d467a410d43a7ddd8d163d (patch) | |
tree | 22c89e9b7abc41c7a69623b79a47eccf815e4947 /src/main/java/org/onap/music/rest/RestMusicLocksAPI.java | |
parent | 4fe3f08aa1c93a1fc81a78544031ef747a747098 (diff) |
Deadlock detection by owner
Issue-ID: MUSIC-502
Signed-off-by: Martella, Arthur <arthur.martella.1@att.com>
Change-Id: Iec20cfeec96d7031c691055ffba2f65c34854adf
Diffstat (limited to 'src/main/java/org/onap/music/rest/RestMusicLocksAPI.java')
-rw-r--r-- | src/main/java/org/onap/music/rest/RestMusicLocksAPI.java | 3 |
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 35f03e60..c08fc5d8 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(); } |