activemq-cpp-3.8.2
RedeliveryPolicy.h
Go to the documentation of this file.
1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 #ifndef _ACTIVEMQ_CORE_REDELIVERYPOLICY_H_
19 #define _ACTIVEMQ_CORE_REDELIVERYPOLICY_H_
20 
21 #include <activemq/util/Config.h>
22 
23 #include <decaf/util/Properties.h>
24 
25 namespace activemq {
26 namespace core {
27 
35  public:
36 
37  static const long long NO_MAXIMUM_REDELIVERIES;
38 
39  private:
40 
42  RedeliveryPolicy& operator=(const RedeliveryPolicy&);
43 
44  protected:
45 
47 
48  public:
49 
50  virtual ~RedeliveryPolicy();
51 
55  virtual double getBackOffMultiplier() const = 0;
56 
63  virtual void setBackOffMultiplier(double value) = 0;
64 
68  virtual short getCollisionAvoidancePercent() const = 0;
69 
74  virtual void setCollisionAvoidancePercent(short value) = 0;
75 
81  virtual long long getInitialRedeliveryDelay() const = 0;
82 
89  virtual void setInitialRedeliveryDelay(long long value) = 0;
90 
96  virtual long long getRedeliveryDelay() const = 0;
97 
104  virtual void setRedeliveryDelay(long long value) = 0;
105 
112  virtual int getMaximumRedeliveries() const = 0;
113 
120  virtual void setMaximumRedeliveries(int maximumRedeliveries) = 0;
121 
131  virtual long long getNextRedeliveryDelay(long long previousDelay) = 0;
132 
136  virtual bool isUseCollisionAvoidance() const = 0;
137 
142  virtual void setUseCollisionAvoidance(bool value) = 0;
143 
147  virtual bool isUseExponentialBackOff() const = 0;
148 
153  virtual void setUseExponentialBackOff(bool value) = 0;
154 
160  virtual RedeliveryPolicy* clone() const = 0;
161 
178  virtual void configure(const decaf::util::Properties& properties);
179 
180  };
181 
182 }}
183 
184 #endif /* _ACTIVEMQ_CORE_REDELIVERYPOLICY_H_ */
Interface for a RedeliveryPolicy object that controls how message Redelivery is handled in ActiveMQ-C...
Definition: RedeliveryPolicy.h:34
#define AMQCPP_API
Definition: Config.h:30
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements...
Definition: CachedConsumer.h:24
Java-like properties class for mapping string names to string values.
Definition: Properties.h:53
static const long long NO_MAXIMUM_REDELIVERIES
Definition: RedeliveryPolicy.h:37