You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2021/12/27 08:51:05 UTC
[camel] 02/02: camel-management - counters on mbeans should not throw exception
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 9cf70a781338c16319678ca6090f0aa36b23a1fc
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Sun Dec 26 12:33:31 2021 +0100
camel-management - counters on mbeans should not throw exception
---
.../api/management/mbean/ManagedCounterMBean.java | 2 +-
.../mbean/ManagedPerformanceCounterMBean.java | 24 +++++++++++-----------
.../camel/management/mbean/ManagedCounter.java | 2 +-
.../mbean/ManagedPerformanceCounter.java | 22 ++++++++++----------
4 files changed, 25 insertions(+), 25 deletions(-)
diff --git a/core/camel-management-api/src/main/java/org/apache/camel/api/management/mbean/ManagedCounterMBean.java b/core/camel-management-api/src/main/java/org/apache/camel/api/management/mbean/ManagedCounterMBean.java
index 01c85f9..21b7544 100644
--- a/core/camel-management-api/src/main/java/org/apache/camel/api/management/mbean/ManagedCounterMBean.java
+++ b/core/camel-management-api/src/main/java/org/apache/camel/api/management/mbean/ManagedCounterMBean.java
@@ -33,6 +33,6 @@ public interface ManagedCounterMBean {
Date getResetTimestamp();
@ManagedAttribute(description = "Total number of exchanges")
- long getExchangesTotal() throws Exception;
+ long getExchangesTotal();
}
diff --git a/core/camel-management-api/src/main/java/org/apache/camel/api/management/mbean/ManagedPerformanceCounterMBean.java b/core/camel-management-api/src/main/java/org/apache/camel/api/management/mbean/ManagedPerformanceCounterMBean.java
index 745e790..0220a14 100644
--- a/core/camel-management-api/src/main/java/org/apache/camel/api/management/mbean/ManagedPerformanceCounterMBean.java
+++ b/core/camel-management-api/src/main/java/org/apache/camel/api/management/mbean/ManagedPerformanceCounterMBean.java
@@ -24,40 +24,40 @@ import org.apache.camel.api.management.ManagedOperation;
public interface ManagedPerformanceCounterMBean extends ManagedCounterMBean {
@ManagedAttribute(description = "Number of completed exchanges")
- long getExchangesCompleted() throws Exception;
+ long getExchangesCompleted();
@ManagedAttribute(description = "Number of failed exchanges")
- long getExchangesFailed() throws Exception;
+ long getExchangesFailed();
@ManagedAttribute(description = "Number of inflight exchanges")
- long getExchangesInflight() throws Exception;
+ long getExchangesInflight();
@ManagedAttribute(description = "Number of failures handled")
- long getFailuresHandled() throws Exception;
+ long getFailuresHandled();
@ManagedAttribute(description = "Number of redeliveries (internal only)")
- long getRedeliveries() throws Exception;
+ long getRedeliveries();
@ManagedAttribute(description = "Number of external initiated redeliveries (such as from JMS broker)")
- long getExternalRedeliveries() throws Exception;
+ long getExternalRedeliveries();
@ManagedAttribute(description = "Min Processing Time [milliseconds]")
- long getMinProcessingTime() throws Exception;
+ long getMinProcessingTime();
@ManagedAttribute(description = "Mean Processing Time [milliseconds]")
- long getMeanProcessingTime() throws Exception;
+ long getMeanProcessingTime();
@ManagedAttribute(description = "Max Processing Time [milliseconds]")
- long getMaxProcessingTime() throws Exception;
+ long getMaxProcessingTime();
@ManagedAttribute(description = "Total Processing Time [milliseconds]")
- long getTotalProcessingTime() throws Exception;
+ long getTotalProcessingTime();
@ManagedAttribute(description = "Last Processing Time [milliseconds]")
- long getLastProcessingTime() throws Exception;
+ long getLastProcessingTime();
@ManagedAttribute(description = "Delta Processing Time [milliseconds]")
- long getDeltaProcessingTime() throws Exception;
+ long getDeltaProcessingTime();
@ManagedAttribute(description = "Last Exchange Completed Timestamp")
Date getLastExchangeCompletedTimestamp();
diff --git a/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedCounter.java b/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedCounter.java
index 2aff01f..a91019c 100644
--- a/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedCounter.java
+++ b/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedCounter.java
@@ -52,7 +52,7 @@ public abstract class ManagedCounter implements ManagedCounterMBean {
}
@Override
- public long getExchangesTotal() throws Exception {
+ public long getExchangesTotal() {
return exchangesTotal.getValue();
}
diff --git a/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedPerformanceCounter.java b/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedPerformanceCounter.java
index 46d9e55..c2d997b 100644
--- a/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedPerformanceCounter.java
+++ b/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedPerformanceCounter.java
@@ -104,12 +104,12 @@ public abstract class ManagedPerformanceCounter extends ManagedCounter
}
@Override
- public long getExchangesCompleted() throws Exception {
+ public long getExchangesCompleted() {
return exchangesCompleted.getValue();
}
@Override
- public long getExchangesFailed() throws Exception {
+ public long getExchangesFailed() {
return exchangesFailed.getValue();
}
@@ -119,47 +119,47 @@ public abstract class ManagedPerformanceCounter extends ManagedCounter
}
@Override
- public long getFailuresHandled() throws Exception {
+ public long getFailuresHandled() {
return failuresHandled.getValue();
}
@Override
- public long getRedeliveries() throws Exception {
+ public long getRedeliveries() {
return redeliveries.getValue();
}
@Override
- public long getExternalRedeliveries() throws Exception {
+ public long getExternalRedeliveries() {
return externalRedeliveries.getValue();
}
@Override
- public long getMinProcessingTime() throws Exception {
+ public long getMinProcessingTime() {
return minProcessingTime.getValue();
}
@Override
- public long getMeanProcessingTime() throws Exception {
+ public long getMeanProcessingTime() {
return meanProcessingTime.getValue();
}
@Override
- public long getMaxProcessingTime() throws Exception {
+ public long getMaxProcessingTime() {
return maxProcessingTime.getValue();
}
@Override
- public long getTotalProcessingTime() throws Exception {
+ public long getTotalProcessingTime() {
return totalProcessingTime.getValue();
}
@Override
- public long getLastProcessingTime() throws Exception {
+ public long getLastProcessingTime() {
return lastProcessingTime.getValue();
}
@Override
- public long getDeltaProcessingTime() throws Exception {
+ public long getDeltaProcessingTime() {
return deltaProcessingTime.getValue();
}