diff options
author | Jorge Hernandez <jh1730@att.com> | 2017-12-01 16:48:58 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2017-12-01 16:48:58 +0000 |
commit | 97fbe2bcc75b1b42745567e10351967ef962d88a (patch) | |
tree | ad2feaa5723859dced65336ab6b95a6cf5c57c36 | |
parent | 7a8d505b684cc568d0f50179ff2c3a4e4880f65d (diff) | |
parent | cbe3fbc728f0428dc339f0b43c2afed163e9ffa7 (diff) |
Merge "make volatile access to alive and locked flags"
-rw-r--r-- | policy-endpoints/src/main/java/org/onap/policy/drools/event/comm/bus/internal/BusPublisher.java | 6 | ||||
-rw-r--r-- | policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngine.java | 8 |
2 files changed, 5 insertions, 9 deletions
diff --git a/policy-endpoints/src/main/java/org/onap/policy/drools/event/comm/bus/internal/BusPublisher.java b/policy-endpoints/src/main/java/org/onap/policy/drools/event/comm/bus/internal/BusPublisher.java index 10bc8325..ad5a9179 100644 --- a/policy-endpoints/src/main/java/org/onap/policy/drools/event/comm/bus/internal/BusPublisher.java +++ b/policy-endpoints/src/main/java/org/onap/policy/drools/event/comm/bus/internal/BusPublisher.java @@ -139,10 +139,7 @@ public interface BusPublisher { @Override public String toString() { StringBuilder builder = new StringBuilder(); - builder.append("CambriaPublisherWrapper ["). - append("publisher.getPendingMessageCount()="). - append(publisher.getPendingMessageCount()). - append("]"); + builder.append("CambriaPublisherWrapper []"); return builder.toString(); } @@ -289,7 +286,6 @@ public interface BusPublisher { append(", publisher.getHost()=").append(publisher.getHost()). append(", publisher.getProtocolFlag()=").append(publisher.getProtocolFlag()). append(", publisher.getUsername()=").append(publisher.getUsername()). - append(", publisher.getPendingMessageCount()=").append(publisher.getPendingMessageCount()). append("]"); return builder.toString(); } 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; } |