summaryrefslogtreecommitdiffstats
path: root/policy-management
diff options
context:
space:
mode:
authorJorge Hernandez <jh1730@att.com>2017-11-30 10:12:33 -0600
committerJorge Hernandez <jh1730@att.com>2017-11-30 10:12:33 -0600
commitcbe3fbc728f0428dc339f0b43c2afed163e9ffa7 (patch)
tree2e51df09b81a95e1938deece812085f3a3f92d08 /policy-management
parent46f1e7e0f4a916af93c82be907433813664c75b5 (diff)
make volatile access to alive and locked flags
instead of synchronized read access Change-Id: I3f4457f798d6f4d4a013bf023ed2d9c1b75d4f1f Issue-ID: POLICY-487 Signed-off-by: Jorge Hernandez <jh1730@att.com>
Diffstat (limited to 'policy-management')
-rw-r--r--policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngine.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngine.java b/policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngine.java
index d60e817a..583deacc 100644
--- a/policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngine.java
+++ b/policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngine.java
@@ -357,12 +357,12 @@ class PolicyEngineManager implements PolicyEngine {
/**
* Is the Policy Engine running?
*/
- protected boolean alive = false;
+ protected volatile boolean alive = false;
/**
* Is the engine locked?
*/
- protected boolean locked = false;
+ protected volatile boolean locked = false;
/**
* Properties used to initialize the engine
@@ -1018,7 +1018,7 @@ class PolicyEngineManager implements PolicyEngine {
}
@Override
- public synchronized boolean isAlive() {
+ public boolean isAlive() {
return this.alive;
}
@@ -1117,7 +1117,7 @@ class PolicyEngineManager implements PolicyEngine {
}
@Override
- public synchronized boolean isLocked() {
+ public boolean isLocked() {
return this.locked;
}