activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [2/2] activemq-artemis git commit: Expose disk-scan-period, max-disk-usage, and global-max-size in server control
Date Mon, 26 Sep 2016 17:33:43 GMT
Expose disk-scan-period, max-disk-usage, and global-max-size in server control


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/b69af66f
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/b69af66f
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/b69af66f

Branch: refs/heads/master
Commit: b69af66f4701e115a74c3d260079cd68345e5298
Parents: 70199f3
Author: Ville Skyttä <ville.skytta@iki.fi>
Authored: Sun Sep 25 20:25:25 2016 +0300
Committer: Clebert Suconic <clebertsuconic@apache.org>
Committed: Mon Sep 26 13:33:23 2016 -0400

----------------------------------------------------------------------
 .../core/management/ActiveMQServerControl.java  | 18 +++++++++
 .../impl/ActiveMQServerControlImpl.java         | 39 ++++++++++++++++++++
 .../ActiveMQServerControlUsingCoreTest.java     | 15 ++++++++
 3 files changed, 72 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b69af66f/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ActiveMQServerControl.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ActiveMQServerControl.java
b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ActiveMQServerControl.java
index bb55d19..02819e5 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ActiveMQServerControl.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ActiveMQServerControl.java
@@ -403,6 +403,24 @@ public interface ActiveMQServerControl {
    @Attribute(desc = "whether the initial replication synchronization process with the backup
server is complete")
    boolean isReplicaSync();
 
+   /**
+    * Returns how often the server checks for disk space usage.
+    */
+   @Attribute(desc = "how often to check for disk space usage, in milliseconds")
+   int getDiskScanPeriod();
+
+   /**
+    * Returns the disk use max limit.
+    */
+   @Attribute(desc = "maximum limit for disk use, in percentage")
+   int getMaxDiskUsage();
+
+   /**
+    * Returns the global max bytes limit for in-memory messages.
+    */
+   @Attribute(desc = "global maximum limit for in-memory messages, in bytes")
+   long getGlobalMaxSize();
+
    // Operations ----------------------------------------------------
 
    /**

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b69af66f/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java
index 362b74a..58b21c3 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java
@@ -546,6 +546,45 @@ public class ActiveMQServerControlImpl extends AbstractControl implements
Active
    }
 
    @Override
+   public int getDiskScanPeriod() {
+      checkStarted();
+
+      clearIO();
+      try {
+         return configuration.getDiskScanPeriod();
+      }
+      finally {
+         blockOnIO();
+      }
+   }
+
+   @Override
+   public int getMaxDiskUsage() {
+      checkStarted();
+
+      clearIO();
+      try {
+         return configuration.getMaxDiskUsage();
+      }
+      finally {
+         blockOnIO();
+      }
+   }
+
+   @Override
+   public long getGlobalMaxSize() {
+      checkStarted();
+
+      clearIO();
+      try {
+         return configuration.getGlobalMaxSize();
+      }
+      finally {
+         blockOnIO();
+      }
+   }
+
+   @Override
    public void deployQueue(final String address, final String name, final String filterString)
throws Exception {
       checkStarted();
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b69af66f/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlUsingCoreTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlUsingCoreTest.java
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlUsingCoreTest.java
index 3d083e2..0d81e93 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlUsingCoreTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlUsingCoreTest.java
@@ -510,6 +510,21 @@ public class ActiveMQServerControlUsingCoreTest extends ActiveMQServerControlTes
          }
 
          @Override
+         public int getDiskScanPeriod() {
+            return (Integer) proxy.retrieveAttributeValue("DiskScanPeriod", Integer.class);
+         }
+
+         @Override
+         public int getMaxDiskUsage() {
+            return (Integer) proxy.retrieveAttributeValue("MaxDiskUsage", Integer.class);
+         }
+
+         @Override
+         public long getGlobalMaxSize() {
+            return (Long) proxy.retrieveAttributeValue("GlobalMaxSize", Long.class);
+         }
+
+         @Override
          public void addSecuritySettings(String addressMatch,
                                          String sendRoles,
                                          String consumeRoles,


Mime
View raw message