Value-semantic type for options related to a queue.
#include <bmqt_queueoptions.h>
◆ HandleAndSubscription
◆ SubscriptionsSnapshot
loadSubscriptions return types
EXPERIMENTAL. Do not use until this feature is announced.
◆ QueueOptions() [1/2]
| BloombergLP::bmqt::QueueOptions::QueueOptions |
( |
bslma::Allocator * |
allocator = 0 | ) |
|
|
explicit |
Create a new QueueOptions using the optionally specified allocator.
◆ QueueOptions() [2/2]
| BloombergLP::bmqt::QueueOptions::QueueOptions |
( |
const QueueOptions & |
other, |
|
|
bslma::Allocator * |
allocator = 0 |
|
) |
| |
Create a new QueueOptions by copying values from the specified other, using the optionally specified allocator.
◆ operator=()
◆ setMaxUnconfirmedMessages()
| QueueOptions & BloombergLP::bmqt::QueueOptions::setMaxUnconfirmedMessages |
( |
int |
value | ) |
|
|
inline |
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.
References BloombergLP::bmqt::Subscription::setMaxUnconfirmedMessages().
◆ setMaxUnconfirmedBytes()
| QueueOptions & BloombergLP::bmqt::QueueOptions::setMaxUnconfirmedBytes |
( |
int |
value | ) |
|
|
inline |
◆ setConsumerPriority()
| QueueOptions & BloombergLP::bmqt::QueueOptions::setConsumerPriority |
( |
int |
value | ) |
|
|
inline |
◆ setSuspendsOnBadHostHealth()
| QueueOptions & BloombergLP::bmqt::QueueOptions::setSuspendsOnBadHostHealth |
( |
bool |
value | ) |
|
|
inline |
◆ merge()
"Merges" another QueueOptions into this one, by invoking setF(other.F()) for all fields F for which other.hasF() is true. Returns the instance on which the method was invoked.
◆ addOrUpdateSubscription()
| bool BloombergLP::bmqt::QueueOptions::addOrUpdateSubscription |
( |
bsl::string * |
errorDescription, |
|
|
const SubscriptionHandle & |
handle, |
|
|
const Subscription & |
subscription |
|
) |
| |
Add, or update if it exists, the specified subscription for the specified handle. Return true on success, otherwise return false and load the specified errorDescription with a description of the error. Note that errorDescription may be null if the caller does not care about getting error messages, but users are strongly encouraged to log error string if this API returns failure.
EXPERIMENTAL. Do not use until this feature is announced.
◆ removeSubscription()
| bool BloombergLP::bmqt::QueueOptions::removeSubscription |
( |
const SubscriptionHandle & |
handle | ) |
|
Return false if subscription does not exist.
EXPERIMENTAL. Do not use until this feature is announced.
◆ removeAllSubscriptions()
| void BloombergLP::bmqt::QueueOptions::removeAllSubscriptions |
( |
| ) |
|
Remove all subscriptions.
EXPERIMENTAL. Do not use until this feature is announced.
◆ maxUnconfirmedMessages()
| int BloombergLP::bmqt::QueueOptions::maxUnconfirmedMessages |
( |
| ) |
const |
|
inline |
◆ maxUnconfirmedBytes()
| int BloombergLP::bmqt::QueueOptions::maxUnconfirmedBytes |
( |
| ) |
const |
|
inline |
◆ consumerPriority()
| int BloombergLP::bmqt::QueueOptions::consumerPriority |
( |
| ) |
const |
|
inline |
◆ suspendsOnBadHostHealth()
| bool BloombergLP::bmqt::QueueOptions::suspendsOnBadHostHealth |
( |
| ) |
const |
|
inline |
◆ hasMaxUnconfirmedMessages()
| bool BloombergLP::bmqt::QueueOptions::hasMaxUnconfirmedMessages |
( |
| ) |
const |
|
inline |
◆ hasMaxUnconfirmedBytes()
| bool BloombergLP::bmqt::QueueOptions::hasMaxUnconfirmedBytes |
( |
| ) |
const |
|
inline |
◆ hasConsumerPriority()
| bool BloombergLP::bmqt::QueueOptions::hasConsumerPriority |
( |
| ) |
const |
|
inline |
◆ hasSuspendsOnBadHostHealth()
| bool BloombergLP::bmqt::QueueOptions::hasSuspendsOnBadHostHealth |
( |
| ) |
const |
|
inline |
Returns whether suspendsOnBadHostHealth has been set for this object, or whether it implicitly holds k_DEFAULT_SUSPENDS_ON_BAD_HOST_HEALTH.
◆ loadSubscription()
Return false if subscription does not exist.
EXPERIMENTAL. Do not use until this feature is announced.
◆ loadSubscriptions()
Load all handles and subscriptions into the specified snapshot.
EXPERIMENTAL. Do not use until this feature is announced.
◆ print()
| bsl::ostream & BloombergLP::bmqt::QueueOptions::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.
Referenced by BloombergLP::bmqa::operator<<(), and BloombergLP::bmqt::operator<<().
◆ k_CONSUMER_PRIORITY_MIN
| const int BloombergLP::bmqt::QueueOptions::k_CONSUMER_PRIORITY_MIN |
|
static |
◆ k_CONSUMER_PRIORITY_MAX
| const int BloombergLP::bmqt::QueueOptions::k_CONSUMER_PRIORITY_MAX |
|
static |
◆ k_DEFAULT_MAX_UNCONFIRMED_MESSAGES
| const int BloombergLP::bmqt::QueueOptions::k_DEFAULT_MAX_UNCONFIRMED_MESSAGES |
|
static |
◆ k_DEFAULT_MAX_UNCONFIRMED_BYTES
| const int BloombergLP::bmqt::QueueOptions::k_DEFAULT_MAX_UNCONFIRMED_BYTES |
|
static |
◆ k_DEFAULT_CONSUMER_PRIORITY
| const int BloombergLP::bmqt::QueueOptions::k_DEFAULT_CONSUMER_PRIORITY |
|
static |
◆ k_DEFAULT_SUSPENDS_ON_BAD_HOST_HEALTH
| const bool BloombergLP::bmqt::QueueOptions::k_DEFAULT_SUSPENDS_ON_BAD_HOST_HEALTH |
|
static |
The documentation for this class was generated from the following file: