From 27ead7707be3574c865affee6645bb7395ff2d5d Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Fri, 29 Jun 2018 13:11:58 -0400 Subject: 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 --- .../drools/core/lock/PolicyResourceLockFeatureAPI.java | 16 ---------------- .../drools/core/lock/PolicyResourceLockManager.java | 15 --------------- 2 files changed, 31 deletions(-) (limited to 'policy-core/src/main') 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 @@ -44,22 +44,6 @@ public interface PolicyResourceLockFeatureAPI extends OrderedService { public static OrderedServiceImpl impl = 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 lock(String resourceId, String owner, Callback callback) { - throw new UnsupportedOperationException("lock with callback"); - } @Override public boolean lock(String resourceId, String owner, int holdSec) { -- cgit 1.2.3-korg