activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject svn commit: r1079331 - in /activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra: ActiveMQActivationSpec.java ActiveMQConnectionRequestInfo.java ActiveMQConnectionSupport.java MessageActivationSpec.java
Date Tue, 08 Mar 2011 11:52:38 GMT
Author: gtully
Date: Tue Mar  8 11:52:37 2011
New Revision: 1079331

URL: http://svn.apache.org/viewvc?rev=1079331&view=rev
Log:
https://issues.apache.org/jira/browse/AMQ-3205 - Update ActivationSpec, patch applied with
thanks

Modified:
    activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQActivationSpec.java
    activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQConnectionRequestInfo.java
    activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQConnectionSupport.java
    activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/MessageActivationSpec.java

Modified: activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQActivationSpec.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQActivationSpec.java?rev=1079331&r1=1079330&r2=1079331&view=diff
==============================================================================
--- activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQActivationSpec.java
(original)
+++ activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQActivationSpec.java
Tue Mar  8 11:52:37 2011
@@ -618,9 +618,20 @@ public class ActiveMQActivationSpec impl
     /**
      * 
      */
-    public void setBackOffMultiplier(short backOffMultiplier) {
+    public void setBackOffMultiplier(double backOffMultiplier) {
         lazyCreateRedeliveryPolicy().setBackOffMultiplier(backOffMultiplier);
     }
+    
+    public long getMaximumRedeliveryDelay() {
+        if (redeliveryPolicy == null) {
+            return 0;
+        }
+        return redeliveryPolicy.getMaximumRedeliveryDelay();
+    }
+    
+    public void setMaximumRedeliveryDelay(long maximumRedeliveryDelay) {
+        lazyCreateRedeliveryPolicy().setMaximumRedeliveryDelay(maximumRedeliveryDelay);
+    }
 
     /**
      * 

Modified: activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQConnectionRequestInfo.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQConnectionRequestInfo.java?rev=1079331&r1=1079330&r2=1079331&view=diff
==============================================================================
--- activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQConnectionRequestInfo.java
(original)
+++ activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQConnectionRequestInfo.java
Tue Mar  8 11:52:37 2011
@@ -205,6 +205,10 @@ public class ActiveMQConnectionRequestIn
         return Long.valueOf(redeliveryPolicy().getInitialRedeliveryDelay());
     }
 
+    public Long getMaximumRedeliveryDelay() {
+        return Long.valueOf(redeliveryPolicy().getMaximumRedeliveryDelay());
+    }
+
     public Integer getMaximumRedeliveries() {
         return Integer.valueOf(redeliveryPolicy().getMaximumRedeliveries());
     }
@@ -225,6 +229,12 @@ public class ActiveMQConnectionRequestIn
         }
     }
 
+    public void setMaximumRedeliveryDelay(Long value) {
+        if (value != null) {
+            redeliveryPolicy().setMaximumRedeliveryDelay(value.longValue());
+        }
+    }
+
     public void setMaximumRedeliveries(Integer value) {
         if (value != null) {
             redeliveryPolicy().setMaximumRedeliveries(value.intValue());

Modified: activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQConnectionSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQConnectionSupport.java?rev=1079331&r1=1079330&r2=1079331&view=diff
==============================================================================
--- activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQConnectionSupport.java
(original)
+++ activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQConnectionSupport.java
Tue Mar  8 11:52:37 2011
@@ -235,6 +235,24 @@ public class ActiveMQConnectionSupport {
         info.setInitialRedeliveryDelay(value);
     }
 
+
+    /**
+     * @return initial redelivery delay
+     */
+    public Long getMaximumRedeliveryDelay() {
+        return info.getMaximumRedeliveryDelay();
+    }
+
+    /**
+     * @param value
+     */
+    public void setMaximumRedeliveryDelay(Long value) {
+        if ( log.isDebugEnabled() ) {
+            log.debug("setting [maximumRedeliveryDelay] to: " + value);
+        }
+        info.setMaximumRedeliveryDelay(value);
+    }
+
     /**
      * @return input stream prefetch
      */

Modified: activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/MessageActivationSpec.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/MessageActivationSpec.java?rev=1079331&r1=1079330&r2=1079331&view=diff
==============================================================================
--- activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/MessageActivationSpec.java
(original)
+++ activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/MessageActivationSpec.java
Tue Mar  8 11:52:37 2011
@@ -116,6 +116,8 @@ public interface MessageActivationSpec e
     String getMaxMessagesPerBatch();
 
     double getBackOffMultiplier();
+    
+    long getMaximumRedeliveryDelay();
 
     long getInitialRedeliveryDelay();
 



Mime
View raw message