diff options
Diffstat (limited to 'feature-distributed-locking/src/main/java')
-rw-r--r-- | feature-distributed-locking/src/main/java/org/onap/policy/distributed/locking/DistributedLockingFeature.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/feature-distributed-locking/src/main/java/org/onap/policy/distributed/locking/DistributedLockingFeature.java b/feature-distributed-locking/src/main/java/org/onap/policy/distributed/locking/DistributedLockingFeature.java index 7906dba7..5994beb6 100644 --- a/feature-distributed-locking/src/main/java/org/onap/policy/distributed/locking/DistributedLockingFeature.java +++ b/feature-distributed-locking/src/main/java/org/onap/policy/distributed/locking/DistributedLockingFeature.java @@ -86,24 +86,24 @@ public class DistributedLockingFeature implements PolicyEngineFeatureAPI, Policy } @Override - public Boolean beforeUnlock(String resourceId, String owner) { + public OperResult beforeUnlock(String resourceId, String owner) { TargetLock tLock = new TargetLock(resourceId, uuid, owner, lockProps); - return tLock.unlock(); + return(tLock.unlock() ? OperResult.OPER_ACCEPTED : OperResult.OPER_DENIED); } @Override - public Boolean beforeIsLockedBy(String resourceId, String owner) { + public OperResult beforeIsLockedBy(String resourceId, String owner) { TargetLock tLock = new TargetLock(resourceId, uuid, owner, lockProps); - - return tLock.isActive(); + + return(tLock.isActive() ? OperResult.OPER_ACCEPTED : OperResult.OPER_DENIED); } @Override - public Boolean beforeIsLocked(String resourceId) { + public OperResult beforeIsLocked(String resourceId) { TargetLock tLock = new TargetLock(resourceId, uuid, "dummyOwner", lockProps); - - return tLock.isLocked(); + + return(tLock.isLocked() ? OperResult.OPER_ACCEPTED : OperResult.OPER_DENIED); } @Override |