gtully commented on a change in pull request #3863:
URL: https://github.com/apache/activemq-artemis/pull/3863#discussion_r760349734



##########
File path: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PagingStoreImpl.java
##########
@@ -1153,6 +1161,31 @@ public boolean isFull() {
       return maxSize > 0 && getAddressSize() > maxSize || 
pagingManager.isGlobalFull();
    }
 
+
+   @Override
+   public int getAddressLimitPercent() {
+      final long currentUsage = getAddressSize();
+      if (currentUsage != 0) {
+         if (maxSize > 0) {
+            return Math.toIntExact((currentUsage / maxSize) * 100);
+         } else if (pagingManager.isUsingGlobalSize()) {
+            return Math.toIntExact((currentUsage / 
pagingManager.getGlobalSize()) * 100);
+         }
+      }
+      return 0;
+   }
+
+   @Override
+   public void block() {
+      blocked = true;
+   }
+
+   @Override
+   public void unBlock() {

Review comment:
       thanks!




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to