activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r366151 - /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/RedeliveryPolicy.java
Date Thu, 05 Jan 2006 10:43:19 GMT
Author: jstrachan
Date: Thu Jan  5 02:43:17 2006
New Revision: 366151

URL: http://svn.apache.org/viewcvs?rev=366151&view=rev
Log:
made it easy to copy a RedeliveryPolicy

Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/RedeliveryPolicy.java

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/RedeliveryPolicy.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/RedeliveryPolicy.java?rev=366151&r1=366150&r2=366151&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/RedeliveryPolicy.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/RedeliveryPolicy.java
Thu Jan  5 02:43:17 2006
@@ -16,73 +16,60 @@
  */
 package org.apache.activemq;
 
-import org.apache.activemq.command.CommandTypes;
-import org.apache.activemq.command.DataStructure;
-
 /**
- * Configuration options used to control how messages are re-delivered when
- * they are rolled back.
- *  
- * @openwire:marshaller
+ * Configuration options used to control how messages are re-delivered when they
+ * are rolled back.
+ * 
  * @version $Revision: 1.11 $
  */
-public class RedeliveryPolicy implements DataStructure {
-    
-    public static final byte DATA_STRUCTURE_TYPE=CommandTypes.REDELIVERY_POLICY;
-    
+public class RedeliveryPolicy implements Cloneable {
+
     protected int maximumRedeliveries = 5;
     protected long initialRedeliveryDelay = 1000L;
     protected boolean useExponentialBackOff = false;
     protected short backOffMultiplier = 5;
-    
-    public RedeliveryPolicy() {        
-    }    
-    
-    public byte getDataStructureType() {
-        return DATA_STRUCTURE_TYPE;
+
+    public RedeliveryPolicy() {
+    }
+
+    public RedeliveryPolicy copy() {
+        try {
+            return (RedeliveryPolicy) clone();
+        }
+        catch (CloneNotSupportedException e) {
+            throw new RuntimeException("Could not clone: " + e, e);
+        }
     }
 
-    /**
-     * @openwire:property version=1 cache=false
-     */
     public short getBackOffMultiplier() {
         return backOffMultiplier;
     }
+
     public void setBackOffMultiplier(short backOffMultiplier) {
         this.backOffMultiplier = backOffMultiplier;
     }
 
-    /**
-     * @openwire:property version=1 cache=false
-     */
     public long getInitialRedeliveryDelay() {
         return initialRedeliveryDelay;
     }
+
     public void setInitialRedeliveryDelay(long initialRedeliveryDelay) {
         this.initialRedeliveryDelay = initialRedeliveryDelay;
     }
 
-    /**
-     * @openwire:property version=1 cache=false
-     */
     public int getMaximumRedeliveries() {
         return maximumRedeliveries;
     }
+
     public void setMaximumRedeliveries(int maximumRedeliveries) {
         this.maximumRedeliveries = maximumRedeliveries;
     }
 
-    /**
-     * @openwire:property version=1 cache=false
-     */
     public boolean isUseExponentialBackOff() {
         return useExponentialBackOff;
     }
+
     public void setUseExponentialBackOff(boolean useExponentialBackOff) {
         this.useExponentialBackOff = useExponentialBackOff;
-    }
-
-    public boolean isMarshallAware() {
-        return false;
     }
 }



Mime
View raw message