diff options
author | Thomas Nelson Jr (arthurdent3) tn1381@att.com <tn1381@att.com> | 2018-03-13 20:10:04 -0400 |
---|---|---|
committer | Thomas Nelson Jr (arthurdent3) tn1381@att.com <tn1381@att.com> | 2018-03-13 20:10:04 -0400 |
commit | 3c86680e532b959bd637b6c093b3916ae5bcee11 (patch) | |
tree | 4e4f5eaed5f15c063a84b55f76ad629de95ea8ef /src/main/java/org/onap/music/lockingservice/ZkStatelessLockService.java | |
parent | ed47d0c5d004b1ce099090100dda6dc1d963782c (diff) |
Docker update and POM fix
Update the docker for cassandra to change ownership of imported files.
Update the POM to fix bug
Numerous bug fixes fro Logging and Error reporting.
Change-Id: I518807f9796734134341ebefd109219050a84b51
Issue-ID: MUSIC-56, MUSIC-57, MUSIC-58
Signed-off-by: Thomas Nelson Jr (arthurdent3) tn1381@att.com <tn1381@att.com>
Diffstat (limited to 'src/main/java/org/onap/music/lockingservice/ZkStatelessLockService.java')
-rw-r--r-- | src/main/java/org/onap/music/lockingservice/ZkStatelessLockService.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/org/onap/music/lockingservice/ZkStatelessLockService.java b/src/main/java/org/onap/music/lockingservice/ZkStatelessLockService.java index 51efafbf..e99df255 100644 --- a/src/main/java/org/onap/music/lockingservice/ZkStatelessLockService.java +++ b/src/main/java/org/onap/music/lockingservice/ZkStatelessLockService.java @@ -23,6 +23,7 @@ import java.util.SortedSet; import java.util.TreeSet; import org.apache.zookeeper.CreateMode; import org.apache.zookeeper.KeeperException; +import org.apache.zookeeper.KeeperException.NoNodeException; import org.apache.zookeeper.ZooDefs; import org.apache.zookeeper.ZooKeeper; import org.apache.zookeeper.data.ACL; @@ -157,8 +158,9 @@ public class ZkStatelessLockService extends ProtocolSupport { * your request in the queue for locking in case you do not already hold the lock. * * @throws RuntimeException throws a runtime exception if it cannot connect to zookeeper. + * @throws NoNodeException */ - public synchronized void unlock(String lockId) throws RuntimeException { + public synchronized void unlock(String lockId) throws RuntimeException, KeeperException.NoNodeException { final String id = lockId; if (!isClosed() && id != null) { try { @@ -175,6 +177,7 @@ public class ZkStatelessLockService extends ProtocolSupport { Thread.currentThread().interrupt(); } catch (KeeperException.NoNodeException e) { // do nothing + throw new KeeperException.NoNodeException("Lock doesn't exists. Release lock operation failed."); } catch (KeeperException e) { logger.error(EELFLoggerDelegate.errorLogger, e.getMessage(),AppMessages.KEEPERERROR, ErrorSeverity.ERROR, ErrorTypes.LOCKINGERROR); throw (RuntimeException) new RuntimeException(e.getMessage()).initCause(e); |