diff options
Diffstat (limited to 'policy-core/src')
-rw-r--r-- | policy-core/src/main/java/org/onap/policy/drools/core/jmx/PdpJmx.java | 7 | ||||
-rw-r--r-- | policy-core/src/main/java/org/onap/policy/drools/core/jmx/PdpJmxListener.java | 5 |
2 files changed, 10 insertions, 2 deletions
diff --git a/policy-core/src/main/java/org/onap/policy/drools/core/jmx/PdpJmx.java b/policy-core/src/main/java/org/onap/policy/drools/core/jmx/PdpJmx.java index d3cf2e9d..19f6afb4 100644 --- a/policy-core/src/main/java/org/onap/policy/drools/core/jmx/PdpJmx.java +++ b/policy-core/src/main/java/org/onap/policy/drools/core/jmx/PdpJmx.java @@ -31,16 +31,21 @@ public class PdpJmx implements PdpJmxMBean { public static PdpJmx getInstance() { return instance; } - + + @Override public long getUpdates(){ return updates.longValue(); } + + @Override public long getRulesFired(){ return actions.longValue(); } + public void updateOccured(){ updates.incrementAndGet(); } + public void ruleFired(){ actions.incrementAndGet(); } diff --git a/policy-core/src/main/java/org/onap/policy/drools/core/jmx/PdpJmxListener.java b/policy-core/src/main/java/org/onap/policy/drools/core/jmx/PdpJmxListener.java index ceb7049e..9136defb 100644 --- a/policy-core/src/main/java/org/onap/policy/drools/core/jmx/PdpJmxListener.java +++ b/policy-core/src/main/java/org/onap/policy/drools/core/jmx/PdpJmxListener.java @@ -36,7 +36,10 @@ import org.slf4j.LoggerFactory; public class PdpJmxListener { public static final Logger logger = LoggerFactory.getLogger(PdpJmxListener.class); - + + private PdpJmxListener() { + } + public static void stop() { final MBeanServer server = ManagementFactory.getPlatformMBeanServer(); try { |