Quick Links:

bmqa | bmqpi | bmqt

Public Member Functions | Static Public Attributes

bmqt::Subscription Class Reference

#include <bmqt_subscription.h>

List of all members.

Public Member Functions

 Subscription ()
 Subscription (const Subscription &other)
SubscriptionsetMaxUnconfirmedMessages (int value)
SubscriptionsetMaxUnconfirmedBytes (int value)
SubscriptionsetConsumerPriority (int value)
SubscriptionsetExpression (const SubscriptionExpression &value)
int maxUnconfirmedMessages () const
int maxUnconfirmedBytes () const
int consumerPriority () const
const SubscriptionExpressionexpression () const
bool hasMaxUnconfirmedMessages () const
bool hasMaxUnconfirmedBytes () const
bool hasConsumerPriority () const
bsl::ostream & print (bsl::ostream &stream, int level=0, int spacesPerLevel=4) const

Static Public Attributes

static const int k_CONSUMER_PRIORITY_MIN
static const int k_CONSUMER_PRIORITY_MAX
static const int k_DEFAULT_MAX_UNCONFIRMED_MESSAGES
static const int k_DEFAULT_MAX_UNCONFIRMED_BYTES
static const int k_DEFAULT_CONSUMER_PRIORITY

Detailed Description

Value-semantic type to carry Subscription parameters.

See Component bmqt_subscription


Constructor & Destructor Documentation

bmqt::Subscription::Subscription (  ) 
bmqt::Subscription::Subscription ( const Subscription other  ) 

Create a new Subscription by copying values from the specified other.


Member Function Documentation

Subscription& bmqt::Subscription::setMaxUnconfirmedMessages ( int  value  ) 

Set the maxUnconfirmedMessages to the specified value. The behavior is undefined unless value >= 0. If the specified value is set to 0, it means that the consumer does not receive any messages. This might be useful when the consumer is shutting down and wants to process only pending messages, or when it is unable to process new messages because of transient issues.

Subscription& bmqt::Subscription::setMaxUnconfirmedBytes ( int  value  ) 

Set the maxUnconfirmedBytes to the specified value. The behavior is undefined unless value >= 0.

Subscription& bmqt::Subscription::setConsumerPriority ( int  value  ) 

Set the consumerPriority to the specified value. The behavior is undefined unless 'k_CONSUMER_PRIORITY_MIN <= value <= k_CONSUMER_PRIORITY_MAX'

Subscription& bmqt::Subscription::setExpression ( const SubscriptionExpression value  ) 
int bmqt::Subscription::maxUnconfirmedMessages (  )  const

Get the number for the maxUnconfirmedMessages parameter.

int bmqt::Subscription::maxUnconfirmedBytes (  )  const

Get the number for the maxUnconfirmedBytes parameter.

int bmqt::Subscription::consumerPriority (  )  const

Get the number for the consumerPriority parameter.

const SubscriptionExpression& bmqt::Subscription::expression (  )  const
bool bmqt::Subscription::hasMaxUnconfirmedMessages (  )  const

Returns whether maxUnconfirmedMessages has been set for this object, or whether it implicitly holds k_DEFAULT_MAX_UNCONFIRMED_MESSAGES.

bool bmqt::Subscription::hasMaxUnconfirmedBytes (  )  const

Returns whether maxUnconfirmedBytes has been set for this object, or whether it implicitly holds k_DEFAULT_MAX_UNCONFIRMED_BYTES.

bool bmqt::Subscription::hasConsumerPriority (  )  const

Returns whether consumerPriority has been set for this object, or whether it implicitly holds k_DEFAULT_CONSUMER_PRIORITY.

bsl::ostream& bmqt::Subscription::print ( bsl::ostream &  stream,
int  level = 0,
int  spacesPerLevel = 4 
) const

Format this object to the specified output stream at the (absolute value of) the optionally specified indentation level and return a reference to stream. If level is specified, optionally specify spacesPerLevel, the number of spaces per indentation level for this and all of its nested objects. If level is negative, suppress indentation of the first line. If spacesPerLevel is negative format the entire output on one line, suppressing all but the initial indentation (as governed by level). If stream is not valid on entry, this operation has no effect.


Member Data Documentation


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