activemq-cpp-3.6.0
activemq::core::PrefetchPolicy Class Reference

Interface for a Policy object that controls message Prefetching on various destination types in ActiveMQ-CPP. More...

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

Inheritance diagram for activemq::core::PrefetchPolicy:

Public Member Functions

virtual ~PrefetchPolicy ()
virtual void setDurableTopicPrefetch (int value)=0
 Sets the amount of prefetched messages for a Durable Topic.
virtual int getDurableTopicPrefetch () const =0
 Gets the amount of messages to prefetch for a Durable Topic.
virtual void setQueuePrefetch (int value)=0
 Sets the amount of prefetched messages for a Queue.
virtual int getQueuePrefetch () const =0
 Gets the amount of messages to prefetch for a Queue.
virtual void setQueueBrowserPrefetch (int value)=0
 Sets the amount of prefetched messages for a Queue Browser.
virtual int getQueueBrowserPrefetch () const =0
 Gets the amount of messages to prefetch for a Queue Browser.
virtual void setTopicPrefetch (int value)=0
 Sets the amount of prefetched messages for a Topic.
virtual int getTopicPrefetch () const =0
 Gets the amount of messages to prefetch for a Topic.
virtual int getMaxPrefetchLimit (int value) const =0
 Given a requested value for a new prefetch limit, compare it against some max prefetch value and return either the requested value or the maximum allowable value for prefetch.
virtual PrefetchPolicyclone () const =0
 Clone the Policy and return a new pointer to that clone.
virtual void configure (const decaf::util::Properties &properties)
 Checks the supplied properties object for properties matching the configurable settings of this class.

Protected Member Functions

 PrefetchPolicy ()

Detailed Description

Interface for a Policy object that controls message Prefetching on various destination types in ActiveMQ-CPP.

Since
3.2.0

Constructor & Destructor Documentation

activemq::core::PrefetchPolicy::PrefetchPolicy ( )
protected
virtual activemq::core::PrefetchPolicy::~PrefetchPolicy ( )
virtual

Member Function Documentation

virtual PrefetchPolicy* activemq::core::PrefetchPolicy::clone ( ) const
pure virtual

Clone the Policy and return a new pointer to that clone.

Returns
pointer to a new PrefetchPolicy instance that is a clone of this one.

Implemented in activemq::core::policies::DefaultPrefetchPolicy.

virtual void activemq::core::PrefetchPolicy::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.PrefetchPolicy.XXX where XXX is the name of a property with a public setter method. For instance cms.PrefetchPolicy.topicPrefetch will be used to set the value of the topic prefetch limit.

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

Parameters
propertiesThe Properties object used to configure this object.
Exceptions
NumberFormatExceptionif a property that is numeric cannot be converted
IllegalArgumentExceptionif a property can't be converted to the correct type.
virtual int activemq::core::PrefetchPolicy::getDurableTopicPrefetch ( ) const
pure virtual

Gets the amount of messages to prefetch for a Durable Topic.

Returns
value of the number of messages to prefetch.

Implemented in activemq::core::policies::DefaultPrefetchPolicy.

virtual int activemq::core::PrefetchPolicy::getMaxPrefetchLimit ( int  value) const
pure virtual

Given a requested value for a new prefetch limit, compare it against some max prefetch value and return either the requested value or the maximum allowable value for prefetch.

Returns
the allowable value for a prefetch limit, either requested or the max.

Implemented in activemq::core::policies::DefaultPrefetchPolicy.

virtual int activemq::core::PrefetchPolicy::getQueueBrowserPrefetch ( ) const
pure virtual

Gets the amount of messages to prefetch for a Queue Browser.

Returns
value of the number of messages to prefetch.

Implemented in activemq::core::policies::DefaultPrefetchPolicy.

virtual int activemq::core::PrefetchPolicy::getQueuePrefetch ( ) const
pure virtual

Gets the amount of messages to prefetch for a Queue.

Returns
value of the number of messages to prefetch.

Implemented in activemq::core::policies::DefaultPrefetchPolicy.

virtual int activemq::core::PrefetchPolicy::getTopicPrefetch ( ) const
pure virtual

Gets the amount of messages to prefetch for a Topic.

Returns
value of the number of messages to prefetch.

Implemented in activemq::core::policies::DefaultPrefetchPolicy.

virtual void activemq::core::PrefetchPolicy::setDurableTopicPrefetch ( int  value)
pure virtual

Sets the amount of prefetched messages for a Durable Topic.

Parameters
valueThe number of messages to prefetch.

Implemented in activemq::core::policies::DefaultPrefetchPolicy.

virtual void activemq::core::PrefetchPolicy::setQueueBrowserPrefetch ( int  value)
pure virtual

Sets the amount of prefetched messages for a Queue Browser.

Parameters
valueThe number of messages to prefetch.

Implemented in activemq::core::policies::DefaultPrefetchPolicy.

virtual void activemq::core::PrefetchPolicy::setQueuePrefetch ( int  value)
pure virtual

Sets the amount of prefetched messages for a Queue.

Parameters
valueThe number of messages to prefetch.

Implemented in activemq::core::policies::DefaultPrefetchPolicy.

virtual void activemq::core::PrefetchPolicy::setTopicPrefetch ( int  value)
pure virtual

Sets the amount of prefetched messages for a Topic.

Parameters
valueThe number of messages to prefetch.

Implemented in activemq::core::policies::DefaultPrefetchPolicy.


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