activemq-cpp-3.9.5
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
22
24
25namespace activemq {
26namespace core {
27
34 class AMQCPP_API RedeliveryPolicy {
35 public:
36
37 static const long long NO_MAXIMUM_REDELIVERIES;
38
39 private:
40
41 RedeliveryPolicy(const RedeliveryPolicy&);
42 RedeliveryPolicy& operator=(const RedeliveryPolicy&);
43
44 protected:
45
47
48 public:
49
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
161 virtual long long getMaximumRedeliveryDelay() const = 0;
162
171 virtual void setMaximumRedeliveryDelay(long long value) = 0;
172
178 virtual RedeliveryPolicy* clone() const = 0;
179
196 virtual void configure(const decaf::util::Properties& properties);
197
198 };
199
200}}
201
202#endif /* _ACTIVEMQ_CORE_REDELIVERYPOLICY_H_ */
#define AMQCPP_API
Definition Config.h:30
virtual void setMaximumRedeliveryDelay(long long value)=0
Sets the maximum amount of time that the redelivery delay is allowed to increase to before it is capp...
virtual void setRedeliveryDelay(long long value)=0
Sets the time that redelivery will be delayed.
virtual long long getNextRedeliveryDelay(long long previousDelay)=0
Given the last used redelivery delay calculate the next value of the delay based on the settings in t...
virtual long long getRedeliveryDelay() const =0
Gets the time that redelivery of messages is delayed.
virtual double getBackOffMultiplier() const =0
virtual void configure(const decaf::util::Properties &properties)
Checks the supplied properties object for properties matching the configurable settings of this class...
virtual bool isUseCollisionAvoidance() const =0
virtual bool isUseExponentialBackOff() const =0
virtual long long getMaximumRedeliveryDelay() const =0
Returns the maximum amount of time that the redelivery delay is allowed to increase to before it is c...
virtual long long getInitialRedeliveryDelay() const =0
Gets the initial time that redelivery of messages is delayed.
virtual void setBackOffMultiplier(double value)=0
Sets the Back-Off Multiplier for Message Redelivery.
virtual int getMaximumRedeliveries() const =0
Gets the Maximum number of allowed redeliveries for a message before it will be discarded by the cons...
virtual void setUseExponentialBackOff(bool value)=0
virtual void setInitialRedeliveryDelay(long long value)=0
Sets the initial time that redelivery will be delayed.
virtual RedeliveryPolicy * clone() const =0
Create a copy of this Policy and return it.
virtual short getCollisionAvoidancePercent() const =0
static const long long NO_MAXIMUM_REDELIVERIES
Definition RedeliveryPolicy.h:37
virtual void setMaximumRedeliveries(int maximumRedeliveries)=0
Sets the Maximum allowable redeliveries for a Message.
virtual void setCollisionAvoidancePercent(short value)=0
virtual void setUseCollisionAvoidance(bool value)=0
Java-like properties class for mapping string names to string values.
Definition Properties.h:53
Definition ActiveMQTempDestination.h:29
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
Definition CachedConsumer.h:24