diff options
author | 2018-07-03 14:08:14 +0000 | |
---|---|---|
committer | 2018-07-03 14:08:14 +0000 | |
commit | a7f0a036fe555e0d81938280af31beac70507689 (patch) | |
tree | 02eb77e486e1dfed088ee6027db7df79389650b0 /policy-core/src | |
parent | 1ed1beaaa4466fb55d7dba3e029b583b835b8aaf (diff) | |
parent | 27ead7707be3574c865affee6645bb7395ff2d5d (diff) |
Merge "Final piece to remove lock Callback"
Diffstat (limited to 'policy-core/src')
2 files changed, 0 insertions, 31 deletions
diff --git a/policy-core/src/main/java/org/onap/policy/drools/core/lock/PolicyResourceLockFeatureAPI.java b/policy-core/src/main/java/org/onap/policy/drools/core/lock/PolicyResourceLockFeatureAPI.java index 1184b017..683dd83d 100644 --- a/policy-core/src/main/java/org/onap/policy/drools/core/lock/PolicyResourceLockFeatureAPI.java +++ b/policy-core/src/main/java/org/onap/policy/drools/core/lock/PolicyResourceLockFeatureAPI.java @@ -45,22 +45,6 @@ public interface PolicyResourceLockFeatureAPI extends OrderedService { new OrderedServiceImpl<>(PolicyResourceLockFeatureAPI.class); /** - * Callback that an implementer invokes, asynchronously, when a lock is acquired (or - * denied). The implementer invokes the method to indicate that the lock was acquired - * (or denied). - */ - @FunctionalInterface - public static interface Callback { - - /** - * - * @param locked {@code true} if the lock was acquired, {@code false} if the lock - * was denied - */ - public void set(boolean locked); - } - - /** * * Result of a requested operation. */ diff --git a/policy-core/src/main/java/org/onap/policy/drools/core/lock/PolicyResourceLockManager.java b/policy-core/src/main/java/org/onap/policy/drools/core/lock/PolicyResourceLockManager.java index afe1cabe..1a94a531 100644 --- a/policy-core/src/main/java/org/onap/policy/drools/core/lock/PolicyResourceLockManager.java +++ b/policy-core/src/main/java/org/onap/policy/drools/core/lock/PolicyResourceLockManager.java @@ -21,10 +21,8 @@ package org.onap.policy.drools.core.lock; import java.util.List; -import java.util.concurrent.Future; import java.util.function.Function; import java.util.function.Supplier; -import org.onap.policy.drools.core.lock.PolicyResourceLockFeatureAPI.Callback; import org.onap.policy.drools.core.lock.PolicyResourceLockFeatureAPI.OperResult; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -68,19 +66,6 @@ public class PolicyResourceLockManager extends SimpleLockManager { protected static void setFactory(Factory factory) { PolicyResourceLockManager.factory = factory; } - - /** - * This method is here temporarily so-as not to break the drools-applications - * build. It will be removed once drools-applications has been updated. - * @param resourceId - * @param owner - * @param callback - * @return nothing; always throws an exception - * @throws UnsupportedOperationException - */ - public Future<Boolean> lock(String resourceId, String owner, Callback callback) { - throw new UnsupportedOperationException("lock with callback"); - } @Override public boolean lock(String resourceId, String owner, int holdSec) { |