aboutsummaryrefslogtreecommitdiffstats
path: root/feature-no-locking/src/main
diff options
context:
space:
mode:
authoradheli.tavares <adheli.tavares@est.tech>2024-08-15 11:08:57 +0100
committeradheli.tavares <adheli.tavares@est.tech>2024-08-15 11:10:39 +0100
commit88744c04a7cfed3a4227bc2137102ff5fe69895f (patch)
tree5865844183729aed07f06dd2f94e4940e7ff80f1 /feature-no-locking/src/main
parentf6d8e60eb75733cf9996bffb3c6ecb586f377da6 (diff)
PostgreSQL support for Drools
- moved all sql related management to db-migrator - any hardcoded variable related to database is configurable Issue-ID: POLICY-5107 Change-Id: I789895773ba8737651f68a0b494f72f947a147d1 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
Diffstat (limited to 'feature-no-locking/src/main')
-rw-r--r--feature-no-locking/src/main/java/org/onap/policy/no/locking/NoLockManager.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/feature-no-locking/src/main/java/org/onap/policy/no/locking/NoLockManager.java b/feature-no-locking/src/main/java/org/onap/policy/no/locking/NoLockManager.java
index 49ea0af9..449f7480 100644
--- a/feature-no-locking/src/main/java/org/onap/policy/no/locking/NoLockManager.java
+++ b/feature-no-locking/src/main/java/org/onap/policy/no/locking/NoLockManager.java
@@ -3,6 +3,7 @@
* ONAP
* ================================================================================
* Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2024 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,7 +21,6 @@
package org.onap.policy.no.locking;
-import java.util.Properties;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.onap.policy.drools.core.lock.AlwaysSuccessLock;
@@ -28,7 +28,6 @@ import org.onap.policy.drools.core.lock.Lock;
import org.onap.policy.drools.core.lock.LockCallback;
import org.onap.policy.drools.core.lock.PolicyResourceLockManager;
import org.onap.policy.drools.features.PolicyEngineFeatureApi;
-import org.onap.policy.drools.system.PolicyEngine;
/**
* In contrast with other implementations the no-lock manager provides non-synchronized access
@@ -43,8 +42,8 @@ public class NoLockManager implements PolicyResourceLockManager, PolicyEngineFea
@Override
public Lock createLock(String resourceId, String ownerKey, int holdSec,
- LockCallback callback, boolean waitForLock) {
- var successLock = new AlwaysSuccessLock(resourceId, ownerKey, holdSec, callback);
+ LockCallback callback, boolean waitForLock) {
+ var successLock = new AlwaysSuccessLock(resourceId, ownerKey, holdSec, callback);
successLock.notifyAvailable();
return successLock;
}
@@ -90,7 +89,7 @@ public class NoLockManager implements PolicyResourceLockManager, PolicyEngineFea
}
@Override
- public PolicyResourceLockManager beforeCreateLockManager(PolicyEngine engine, Properties properties) {
+ public PolicyResourceLockManager beforeCreateLockManager() {
return this;
}
}