Quick Links:

bmqa | bmqpi | bmqt

Public Member Functions | Static Public Attributes

bmqt::SessionOptions Class Reference

#include <bmqt_sessionoptions.h>

List of all members.

Public Member Functions

 SessionOptions (bslma::Allocator *allocator=0)
 SessionOptions (const SessionOptions &other, bslma::Allocator *allocator=0)
SessionOptionssetBrokerUri (const bslstl::StringRef &value)
SessionOptionssetProcessNameOverride (const bslstl::StringRef &value)
SessionOptionssetNumProcessingThreads (int value)
SessionOptionssetBlobBufferSize (int value)
SessionOptionssetChannelHighWatermark (bsls::Types::Int64 value)
SessionOptionssetStatsDumpInterval (const bsls::TimeInterval &value)
SessionOptionssetConnectTimeout (const bsls::TimeInterval &value)
SessionOptionssetDisconnectTimeout (const bsls::TimeInterval &value)
SessionOptionssetOpenQueueTimeout (const bsls::TimeInterval &value)
SessionOptionssetConfigureQueueTimeout (const bsls::TimeInterval &value)
SessionOptionssetCloseQueueTimeout (const bsls::TimeInterval &value)
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
const bsl::string & processNameOverride () const
int numProcessingThreads () const
int blobBufferSize () const
bsls::Types::Int64 channelHighWatermark () const
const bsls::TimeInterval & statsDumpInterval () const
const bsls::TimeInterval & connectTimeout () const
const bsls::TimeInterval & disconnectTimeout () const
const bsls::TimeInterval & openQueueTimeout () const
const bsls::TimeInterval & configureQueueTimeout () const
const bsls::TimeInterval & closeQueueTimeout () const
const bsl::shared_ptr
< bmqpi::HostHealthMonitor > & 
hostHealthMonitor () const
const bsl::shared_ptr
< bmqpi::DTContext > & 
traceContext () const
const bsl::shared_ptr
< bmqpi::DTTracer > & 
tracer () const
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 []
static const int k_BROKER_DEFAULT_PORT = 30114
static const int k_QUEUE_OPERATION_DEFAULT_TIMEOUT

Detailed Description

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

See Component bmqt_sessionoptions


Constructor & Destructor Documentation

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

Create a new SessionOptions using the optionally specified allocator.

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

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

Set the broker URI to the specified value.

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

Set an override of the proces name to the specified value.

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

Set the number of processing threads to the specified value.

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

Set the specified value for the size of blobs buffers.

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

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

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

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

SessionOptions& bmqt::SessionOptions::setConnectTimeout ( const bsls::TimeInterval &  value  ) 
SessionOptions& bmqt::SessionOptions::setDisconnectTimeout ( const bsls::TimeInterval &  value  ) 
SessionOptions& bmqt::SessionOptions::setOpenQueueTimeout ( const bsls::TimeInterval &  value  ) 
SessionOptions& bmqt::SessionOptions::setConfigureQueueTimeout ( const bsls::TimeInterval &  value  ) 
SessionOptions& bmqt::SessionOptions::setCloseQueueTimeout ( const bsls::TimeInterval &  value  ) 

Set the timeout for operations of the corresponding type to the specified value.

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

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

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

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.

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

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

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

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.

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

Get the broker URI.

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

Return the process name override.

int bmqt::SessionOptions::numProcessingThreads (  )  const

Get the number of processing threads.

int bmqt::SessionOptions::blobBufferSize (  )  const

Get the size of the blobs buffer.

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

Get the channel high watermark.

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

Get the stats dump interval.

const bsls::TimeInterval& bmqt::SessionOptions::connectTimeout (  )  const
const bsls::TimeInterval& bmqt::SessionOptions::disconnectTimeout (  )  const
const bsls::TimeInterval& bmqt::SessionOptions::openQueueTimeout (  )  const
const bsls::TimeInterval& bmqt::SessionOptions::configureQueueTimeout (  )  const
const bsls::TimeInterval& bmqt::SessionOptions::closeQueueTimeout (  )  const

Get the timeout for the operations of the corresponding type.

const bsl::shared_ptr<bmqpi::HostHealthMonitor>& bmqt::SessionOptions::hostHealthMonitor (  )  const
const bsl::shared_ptr<bmqpi::DTContext>& bmqt::SessionOptions::traceContext (  )  const

Get the Distributed Trace context object.

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

Get the Distributed Trace tracer object.

int bmqt::SessionOptions::eventQueueLowWatermark (  )  const
int bmqt::SessionOptions::eventQueueHighWatermark (  )  const
int bmqt::SessionOptions::eventQueueSize (  )  const

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

bsl::ostream& 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.


Member Data Documentation

const int bmqt::SessionOptions::k_BROKER_DEFAULT_PORT = 30114 [static]
Initial value:
                                 5 * bdlt::TimeUnitRatio::k_SECONDS_PER_MINUTE

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