From ea39a71e28f2772da7d467a410d43a7ddd8d163d Mon Sep 17 00:00:00 2001 From: Arthur Martella Date: Fri, 13 Sep 2019 15:59:26 -0400 Subject: Deadlock detection by owner Issue-ID: MUSIC-502 Signed-off-by: Martella, Arthur Change-Id: Iec20cfeec96d7031c691055ffba2f65c34854adf --- src/main/java/org/onap/music/rest/RestMusicLocksAPI.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/main/java/org/onap/music/rest/RestMusicLocksAPI.java') 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(); } -- cgit 1.2.3-korg