aboutsummaryrefslogtreecommitdiffstats
path: root/policy-core/src
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2018-06-29 13:11:58 -0400
committerJim Hahn <jrh3@att.com>2018-06-29 13:11:58 -0400
commit27ead7707be3574c865affee6645bb7395ff2d5d (patch)
tree51be54a847656b11bf5b7c3ce8d6426b9a650eee /policy-core/src
parentee2313141a40222a83d6bf39a15c3f9d4c3a239e (diff)
Final piece to remove lock Callback
Now that drools-applications no longer uses the lock Callback, it can be removed from drools-pdp. Change-Id: Ie82a6d382b54041ab612e73ad8c96176bd01a9f6 Issue-ID: POLICY-872 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'policy-core/src')
-rw-r--r--policy-core/src/main/java/org/onap/policy/drools/core/lock/PolicyResourceLockFeatureAPI.java16
-rw-r--r--policy-core/src/main/java/org/onap/policy/drools/core/lock/PolicyResourceLockManager.java15
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) {