activemq::core::RedeliveryPolicy Class Reference

Interface for a RedeliveryPolicy object that controls how message Redelivery is handled in ActiveMQ-CPP when a transaction is rolled back. More...

#include <src/main/activemq/core/RedeliveryPolicy.h>

Inheritance diagram for activemq::core::RedeliveryPolicy:
Inheritance graph
[legend]

Public Member Functions

virtual ~RedeliveryPolicy ()
virtual double getBackOffMultiplier () const =0
virtual void setBackOffMultiplier (double value)=0
 Sets the Back-Off Multiplier for Message Redelivery.
virtual short getCollisionAvoidancePercent () const =0
virtual void setCollisionAvoidancePercent (short value)=0
virtual long long getInitialRedeliveryDelay () const =0
 Gets the initial time that redelivery of messages is delayed.
virtual void setInitialRedeliveryDelay (long long value)=0
 Sets the initial time that redelivery will be delayed.
virtual long long getRedeliveryDelay () const =0
 Gets the time that redelivery of messages is delayed.
virtual void setRedeliveryDelay (long long value)=0
 Sets the time that redelivery will be delayed.
virtual int getMaximumRedeliveries () const =0
 Gets the Maximum number of allowed redeliveries for a message before it will be discarded by the consumer.
virtual void setMaximumRedeliveries (int maximumRedeliveries)=0
 Sets the Maximum allowable redeliveries for a Message.
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 this Policy instance.
virtual bool isUseCollisionAvoidance () const =0
virtual void setUseCollisionAvoidance (bool value)=0
virtual bool isUseExponentialBackOff () const =0
virtual void setUseExponentialBackOff (bool value)=0
virtual RedeliveryPolicyclone () const =0
 Create a copy of this Policy and return it.
virtual void configure (const decaf::util::Properties &properties)
 Checks the supplied properties object for properties matching the configurable settings of this class.

Static Public Attributes

static const long long NO_MAXIMUM_REDELIVERIES

Protected Member Functions

 RedeliveryPolicy ()

Detailed Description

Interface for a RedeliveryPolicy object that controls how message Redelivery is handled in ActiveMQ-CPP when a transaction is rolled back.

Since:
3.2.0

Constructor & Destructor Documentation

activemq::core::RedeliveryPolicy::RedeliveryPolicy (  )  [protected]
virtual activemq::core::RedeliveryPolicy::~RedeliveryPolicy (  )  [virtual]

Member Function Documentation

virtual RedeliveryPolicy* activemq::core::RedeliveryPolicy::clone (  )  const [pure virtual]

Create a copy of this Policy and return it.

Returns:
pointer to a new RedeliveryPolicy that is a copy of this one.

Implemented in activemq::core::policies::DefaultRedeliveryPolicy.

virtual void activemq::core::RedeliveryPolicy::configure ( const decaf::util::Properties properties  )  [virtual]

Checks the supplied properties object for properties matching the configurable settings of this class.

The default implementation looks for properties named with the prefix cms.RedeliveryPolicy.XXX where XXX is the name of a property with a public setter method. For instance cms.RedeliveryPolicy.useExponentialBackOff will be used to set the value of the use exponential back off toggle.

Subclasses can override this method to add more configuration options or to exclude certain parameters from being set via the properties object.

Parameters:
properties The Properties object used to configure this object.
Exceptions:
NumberFormatException if a property that is numeric cannot be converted
IllegalArgumentException if a property can't be converted to the correct type.
virtual double activemq::core::RedeliveryPolicy::getBackOffMultiplier (  )  const [pure virtual]
Returns:
The value of the Back-Off Multiplier for Message Redelivery.

Implemented in activemq::core::policies::DefaultRedeliveryPolicy.

virtual short activemq::core::RedeliveryPolicy::getCollisionAvoidancePercent (  )  const [pure virtual]
Returns:
the currently set Collision Avoidance percentage.

Implemented in activemq::core::policies::DefaultRedeliveryPolicy.

virtual long long activemq::core::RedeliveryPolicy::getInitialRedeliveryDelay (  )  const [pure virtual]

Gets the initial time that redelivery of messages is delayed.

Returns:
the time in milliseconds that redelivery is delayed initially.

Implemented in activemq::core::policies::DefaultRedeliveryPolicy.

virtual int activemq::core::RedeliveryPolicy::getMaximumRedeliveries (  )  const [pure virtual]

Gets the Maximum number of allowed redeliveries for a message before it will be discarded by the consumer.

Returns:
maximum allowed redeliveries for a message.

Implemented in activemq::core::policies::DefaultRedeliveryPolicy.

virtual long long activemq::core::RedeliveryPolicy::getNextRedeliveryDelay ( long long  previousDelay  )  [pure virtual]

Given the last used redelivery delay calculate the next value of the delay based on the settings in this Policy instance.

Parameters:
previousDelay The last delay that was used between message redeliveries.
Returns:
the new delay to use before attempting another redelivery.

Implemented in activemq::core::policies::DefaultRedeliveryPolicy.

virtual long long activemq::core::RedeliveryPolicy::getRedeliveryDelay (  )  const [pure virtual]

Gets the time that redelivery of messages is delayed.

Returns:
the time in milliseconds that redelivery is delayed.

Implemented in activemq::core::policies::DefaultRedeliveryPolicy.

virtual bool activemq::core::RedeliveryPolicy::isUseCollisionAvoidance (  )  const [pure virtual]
Returns:
whether or not collision avoidance is enabled for this Policy.

Implemented in activemq::core::policies::DefaultRedeliveryPolicy.

virtual bool activemq::core::RedeliveryPolicy::isUseExponentialBackOff (  )  const [pure virtual]
Returns:
whether or not the exponential back off option is enabled.

Implemented in activemq::core::policies::DefaultRedeliveryPolicy.

virtual void activemq::core::RedeliveryPolicy::setBackOffMultiplier ( double  value  )  [pure virtual]

Sets the Back-Off Multiplier for Message Redelivery.

Parameters:
value The new value for the back-off multiplier.

Implemented in activemq::core::policies::DefaultRedeliveryPolicy.

virtual void activemq::core::RedeliveryPolicy::setCollisionAvoidancePercent ( short  value  )  [pure virtual]
Parameters:
value The collision avoidance percentage setting.

Implemented in activemq::core::policies::DefaultRedeliveryPolicy.

virtual void activemq::core::RedeliveryPolicy::setInitialRedeliveryDelay ( long long  value  )  [pure virtual]

Sets the initial time that redelivery will be delayed.

Parameters:
value Time in Milliseconds to wait before starting redelivery.

Implemented in activemq::core::policies::DefaultRedeliveryPolicy.

virtual void activemq::core::RedeliveryPolicy::setMaximumRedeliveries ( int  maximumRedeliveries  )  [pure virtual]

Sets the Maximum allowable redeliveries for a Message.

Parameters:
maximumRedeliveries The maximum number of times that a message will be redelivered.

Implemented in activemq::core::policies::DefaultRedeliveryPolicy.

virtual void activemq::core::RedeliveryPolicy::setRedeliveryDelay ( long long  value  )  [pure virtual]

Sets the time that redelivery will be delayed.

Parameters:
value Time in Milliseconds to wait before the next redelivery.

Implemented in activemq::core::policies::DefaultRedeliveryPolicy.

virtual void activemq::core::RedeliveryPolicy::setUseCollisionAvoidance ( bool  value  )  [pure virtual]
Parameters:
value Enable or Disable collision avoidance for this Policy.

Implemented in activemq::core::policies::DefaultRedeliveryPolicy.

virtual void activemq::core::RedeliveryPolicy::setUseExponentialBackOff ( bool  value  )  [pure virtual]
Parameters:
value Enable or Disable the exponential back off multiplier option.

Implemented in activemq::core::policies::DefaultRedeliveryPolicy.


Field Documentation


The documentation for this class was generated from the following file:

Generated on 1 Dec 2014 for activemq-cpp-3.8.2 by  doxygen 1.6.1