diff options
author | Jim Hahn <jrh3@att.com> | 2019-11-14 15:16:13 -0500 |
---|---|---|
committer | Jim Hahn <jrh3@att.com> | 2019-11-14 16:42:52 -0500 |
commit | 58c3811bfba7e421af8c9d2d72f55e95b4b01a50 (patch) | |
tree | 23e35bdb304e17665aae1e5662494bac77a30772 /feature-distributed-locking/src/main/java/org | |
parent | 8bb11a84b833c7db1342af0c5823ee8309f15c1a (diff) |
Invoke lock callback in session thread
Injects the callback as a DroolsRunnable into the session, if
there is one. Otherwise, it invokes it via the engine's
thread pool.
Issue-ID: POLICY-2246
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: I214480ae675d89e7335dde4eb4abe2684f7ef8ab
Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'feature-distributed-locking/src/main/java/org')
-rw-r--r-- | feature-distributed-locking/src/main/java/org/onap/policy/distributed/locking/DistributedLockManager.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/feature-distributed-locking/src/main/java/org/onap/policy/distributed/locking/DistributedLockManager.java b/feature-distributed-locking/src/main/java/org/onap/policy/distributed/locking/DistributedLockManager.java index 7d58b8d5..528fa7cb 100644 --- a/feature-distributed-locking/src/main/java/org/onap/policy/distributed/locking/DistributedLockManager.java +++ b/feature-distributed-locking/src/main/java/org/onap/policy/distributed/locking/DistributedLockManager.java @@ -341,7 +341,7 @@ public class DistributedLockManager extends LockManager<DistributedLockManager.D DistributedLock lock = lockref.get(); if (lock != null) { logger.debug("removed lock from map {}", lock); - lock.deny(DistributedLock.LOCK_LOST_MSG, false); + lock.deny(DistributedLock.LOCK_LOST_MSG); } } } @@ -473,7 +473,7 @@ public class DistributedLockManager extends LockManager<DistributedLockManager.D scheduleRequest(this::doExtend); } else { - deny(NOT_LOCKED_MSG, true); + deny(NOT_LOCKED_MSG); } } @@ -639,7 +639,7 @@ public class DistributedLockManager extends LockManager<DistributedLockManager.D } if (success) { - grant(true); + grant(); return; } } @@ -690,7 +690,7 @@ public class DistributedLockManager extends LockManager<DistributedLockManager.D * the record, thus we have to try to insert, if the update fails */ if (doDbUpdate(conn) || doDbInsert(conn)) { - grant(true); + grant(); return; } } @@ -790,7 +790,7 @@ public class DistributedLockManager extends LockManager<DistributedLockManager.D synchronized (this) { if (!isUnavailable()) { - deny(LOCK_LOST_MSG, true); + deny(LOCK_LOST_MSG); } } } |