libbmq  a5f8a06ba1d16cb5a65643e1fa7f1a1d6aadef40
BloombergLP::bmqt::SessionOptions Class Reference

#include <bmqt_sessionoptions.h>

Public Member Functions

 SessionOptions (bslma::Allocator *allocator=0)
 
 SessionOptions (const SessionOptions &other, bslma::Allocator *allocator=0)
 
SessionOptionssetBrokerUri (const bslstl::StringRef &value)
 Set the broker URI to the specified value. More...
 
SessionOptionssetProcessNameOverride (const bslstl::StringRef &value)
 Set an override of the proces name to the specified value. More...
 
SessionOptionssetNumProcessingThreads (int value)
 Set the number of processing threads to the specified value. More...
 
SessionOptionssetBlobBufferSize (int value)
 Set the specified value for the size of blobs buffers. More...
 
SessionOptionssetChannelHighWatermark (bsls::Types::Int64 value)
 
SessionOptionssetStatsDumpInterval (const bsls::TimeInterval &value)
 
SessionOptionssetConnectTimeout (const bsls::TimeInterval &value)
 Set the timeout for connecting to the broker to the specified value. More...
 
SessionOptionssetDisconnectTimeout (const bsls::TimeInterval &value)
 
SessionOptionssetOpenQueueTimeout (const bsls::TimeInterval &value)
 Set the timeout for opening a queue to the specified value. More...
 
SessionOptionssetConfigureQueueTimeout (const bsls::TimeInterval &value)
 
SessionOptionssetCloseQueueTimeout (const bsls::TimeInterval &value)
 Set the timeout for closing a queue to the specified value. More...
 
SessionOptionssetHostHealthMonitor (const bsl::shared_ptr< bmqpi::HostHealthMonitor > &monitor)
 
SessionOptionssetTraceOptions (const bsl::shared_ptr< bmqpi::DTContext > &dtContext, const bsl::shared_ptr< bmqpi::DTTracer > &dtTracer)
 
SessionOptionsconfigureEventQueue (int queueSize, int lowWatermark, int highWatermark)
 
SessionOptionsconfigureEventQueue (int lowWatermark, int highWatermark)
 
const bsl::string & brokerUri () const
 Get the broker URI. More...
 
const bsl::string & processNameOverride () const
 Return the process name override. More...
 
int numProcessingThreads () const
 Get the number of processing threads. More...
 
int blobBufferSize () const
 Get the size of the blobs buffer. More...
 
bsls::Types::Int64 channelHighWatermark () const
 Get the channel high watermark. More...
 
const bsls::TimeInterval & statsDumpInterval () const
 Get the stats dump interval. More...
 
const bsls::TimeInterval & connectTimeout () const
 Get the timeout for connecting to the broker. More...
 
const bsls::TimeInterval & disconnectTimeout () const
 Get the timeout for disconnecting from the broker. More...
 
const bsls::TimeInterval & openQueueTimeout () const
 Get the timeout for opening a queue. More...
 
const bsls::TimeInterval & configureQueueTimeout () const
 Get the timeout for configuring or disconfiguring a queue. More...
 
const bsls::TimeInterval & closeQueueTimeout () const
 Get the timeout for closing a queue. More...
 
const bsl::shared_ptr< bmqpi::HostHealthMonitor > & hostHealthMonitor () const
 
const bsl::shared_ptr< bmqpi::DTContext > & traceContext () const
 Get the Distributed Trace context object. More...
 
const bsl::shared_ptr< bmqpi::DTTracer > & tracer () const
 Get the Distributed Trace tracer object. More...
 
int eventQueueLowWatermark () const
 
int eventQueueHighWatermark () const
 
int eventQueueSize () const
 
bsl::ostream & print (bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
 

Static Public Attributes

static const char k_BROKER_DEFAULT_URI []
 Default URI of the bmqbrkr to connect to. More...
 
static const int k_BROKER_DEFAULT_PORT = 30114
 Default port the bmqbrkr is listening to for client to connect. More...
 
static const int k_QUEUE_OPERATION_DEFAULT_TIMEOUT
 

Detailed Description

value-semantic type for options to configure a session with a BlazingMQ broker

Constructor & Destructor Documentation

◆ SessionOptions() [1/2]

BloombergLP::bmqt::SessionOptions::SessionOptions ( bslma::Allocator *  allocator = 0)
explicit

Create a new SessionOptions using the optionally specified allocator.

◆ SessionOptions() [2/2]

BloombergLP::bmqt::SessionOptions::SessionOptions ( const SessionOptions other,
bslma::Allocator *  allocator = 0 
)

Create a new SessionOptions by copying values from the specified other, using the optionally specified allocator.

Member Function Documentation

◆ setBrokerUri()

SessionOptions & BloombergLP::bmqt::SessionOptions::setBrokerUri ( const bslstl::StringRef &  value)
inline

◆ setProcessNameOverride()

SessionOptions & BloombergLP::bmqt::SessionOptions::setProcessNameOverride ( const bslstl::StringRef &  value)
inline

◆ setNumProcessingThreads()

SessionOptions & BloombergLP::bmqt::SessionOptions::setNumProcessingThreads ( int  value)
inline

◆ setBlobBufferSize()

SessionOptions & BloombergLP::bmqt::SessionOptions::setBlobBufferSize ( int  value)
inline

◆ setChannelHighWatermark()

SessionOptions & BloombergLP::bmqt::SessionOptions::setChannelHighWatermark ( bsls::Types::Int64  value)
inline

Set the specified value (in bytes) for the channel high watermark. The behavior is undefined unless 8 * 1024 * 1024 < value.

◆ setStatsDumpInterval()

SessionOptions & BloombergLP::bmqt::SessionOptions::setStatsDumpInterval ( const bsls::TimeInterval &  value)
inline

Set the statsDumpInterval to the specified value. The behavior is undefined unless value is a multiple of 30s and less than 60 minutes.

◆ setConnectTimeout()

SessionOptions & BloombergLP::bmqt::SessionOptions::setConnectTimeout ( const bsls::TimeInterval &  value)
inline

◆ setDisconnectTimeout()

SessionOptions & BloombergLP::bmqt::SessionOptions::setDisconnectTimeout ( const bsls::TimeInterval &  value)
inline

Set the timeout for disconnecting from the broker to the specified value.

◆ setOpenQueueTimeout()

SessionOptions & BloombergLP::bmqt::SessionOptions::setOpenQueueTimeout ( const bsls::TimeInterval &  value)
inline

◆ setConfigureQueueTimeout()

SessionOptions & BloombergLP::bmqt::SessionOptions::setConfigureQueueTimeout ( const bsls::TimeInterval &  value)
inline

Set the timeout for configuring or deconfiguring a queue to the specified value.

◆ setCloseQueueTimeout()

SessionOptions & BloombergLP::bmqt::SessionOptions::setCloseQueueTimeout ( const bsls::TimeInterval &  value)
inline

◆ setHostHealthMonitor()

SessionOptions & BloombergLP::bmqt::SessionOptions::setHostHealthMonitor ( const bsl::shared_ptr< bmqpi::HostHealthMonitor > &  monitor)
inline

Set a HostHealthMonitor object that will notify the session when the health of the host has changed.

◆ setTraceOptions()

SessionOptions & BloombergLP::bmqt::SessionOptions::setTraceOptions ( const bsl::shared_ptr< bmqpi::DTContext > &  dtContext,
const bsl::shared_ptr< bmqpi::DTTracer > &  dtTracer 
)
inline

Set the DTContext and DTTracer objects needed to integrate with Distributed Trace frameworks. Either both arguments must point to valid instances, or both must be empty shared_ptr's; if either is an empty shared_ptr and the other is not, then behavior is undefined.

References tracer().

◆ configureEventQueue() [1/2]

SessionOptions & BloombergLP::bmqt::SessionOptions::configureEventQueue ( int  queueSize,
int  lowWatermark,
int  highWatermark 
)
inline

DEPRECATED: Use 'configureEventQueue(int lowWatermark, int highWatermark)' instead. This method will be marked as BSLS_ANNOTATION_DEPRECATED in future release of libbmq.

◆ configureEventQueue() [2/2]

SessionOptions & BloombergLP::bmqt::SessionOptions::configureEventQueue ( int  lowWatermark,
int  highWatermark 
)
inline

Configure the EventQueue notification watermarks thresholds with the specified lowWatermark and highWatermark value. Refer to the component level documentation for explanation of those watermarks. The behavior is undefined unless lowWatermark < highWatermark.

◆ brokerUri()

const bsl::string & BloombergLP::bmqt::SessionOptions::brokerUri ( ) const
inline

◆ processNameOverride()

const bsl::string & BloombergLP::bmqt::SessionOptions::processNameOverride ( ) const
inline

◆ numProcessingThreads()

int BloombergLP::bmqt::SessionOptions::numProcessingThreads ( ) const
inline

◆ blobBufferSize()

int BloombergLP::bmqt::SessionOptions::blobBufferSize ( ) const
inline

◆ channelHighWatermark()

bsls::Types::Int64 BloombergLP::bmqt::SessionOptions::channelHighWatermark ( ) const
inline

◆ statsDumpInterval()

const bsls::TimeInterval & BloombergLP::bmqt::SessionOptions::statsDumpInterval ( ) const
inline

◆ connectTimeout()

const bsls::TimeInterval & BloombergLP::bmqt::SessionOptions::connectTimeout ( ) const
inline

◆ disconnectTimeout()

const bsls::TimeInterval & BloombergLP::bmqt::SessionOptions::disconnectTimeout ( ) const
inline

◆ openQueueTimeout()

const bsls::TimeInterval & BloombergLP::bmqt::SessionOptions::openQueueTimeout ( ) const
inline

◆ configureQueueTimeout()

const bsls::TimeInterval & BloombergLP::bmqt::SessionOptions::configureQueueTimeout ( ) const
inline

◆ closeQueueTimeout()

const bsls::TimeInterval & BloombergLP::bmqt::SessionOptions::closeQueueTimeout ( ) const
inline

◆ hostHealthMonitor()

const bsl::shared_ptr< bmqpi::HostHealthMonitor > & BloombergLP::bmqt::SessionOptions::hostHealthMonitor ( ) const
inline

◆ traceContext()

const bsl::shared_ptr< bmqpi::DTContext > & BloombergLP::bmqt::SessionOptions::traceContext ( ) const
inline

◆ tracer()

const bsl::shared_ptr< bmqpi::DTTracer > & BloombergLP::bmqt::SessionOptions::tracer ( ) const
inline

◆ eventQueueLowWatermark()

int BloombergLP::bmqt::SessionOptions::eventQueueLowWatermark ( ) const
inline

◆ eventQueueHighWatermark()

int BloombergLP::bmqt::SessionOptions::eventQueueHighWatermark ( ) const
inline

◆ eventQueueSize()

int BloombergLP::bmqt::SessionOptions::eventQueueSize ( ) const
inline

DEPRECATED: This parameter is no longer relevant and will be removed in future release of libbmq.

◆ print()

bsl::ostream& BloombergLP::bmqt::SessionOptions::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::bmqt::operator<<().

Member Data Documentation

◆ k_BROKER_DEFAULT_URI

const char BloombergLP::bmqt::SessionOptions::k_BROKER_DEFAULT_URI[]
static

◆ k_BROKER_DEFAULT_PORT

const int BloombergLP::bmqt::SessionOptions::k_BROKER_DEFAULT_PORT = 30114
static

◆ k_QUEUE_OPERATION_DEFAULT_TIMEOUT

const int BloombergLP::bmqt::SessionOptions::k_QUEUE_OPERATION_DEFAULT_TIMEOUT
static
Initial value:
=
5 * bdlt::TimeUnitRatio::k_SECONDS_PER_MINUTE

The default, and minimum recommended, value for queue operations (open, configure, close).


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