This class defines a mechanism for scheduling the periodic publication of metrics.

Synopsis

Declared in <balm_publicationscheduler.h>

class PublicationScheduler;

Description

Each publication scheduler object is supplied the address of a MetricsManager and a bdlmt::TimerEventScheduler at construction. The metrics manager is used to publish metrics, while the timer‐event scheduler provides the underlying scheduling mechanism. Metrics are scheduled for publication using the scheduleCategory and setDefaultSchedule methods. The scheduleCategory method schedules an individual category to be publisher periodically at the provided interval, whereas setDefaultSchedule schedules the periodic publication of any category not given an individual schedule. The publication scheduler will create a recurring timer for each unique time interval supplied, and will group together categories that share a common time interval into a single call to MetricsManager::publish. Note that it is left unspecified whether publication events that occur on a common multiple of different intervals will be grouped into a single invocation of MetricsManager::publish.

Member Functions

Name

Description

PublicationScheduler [constructor]

Create a publication scheduler that publishes via metricsManager.

~PublicationScheduler [destructor]

Destroy this publication scheduler and cancel pending publications.

cancelAll

Cancel all periodic publication of metrics.

cancelCategorySchedule

Cancel the periodic publication schedule for category.

clearDefaultSchedule

Cancel the default publication schedule, if one has been set.

findCategorySchedule

Load into result the individual schedule interval for category.

getCategorySchedule

Load the current category publication schedule into result.

getDefaultSchedule

Load into result the default scheduled publication interval.

manager

manager overloads

print

Print this scheduler's state to the specified stream.

scheduleCategory

Schedule category for periodic publication at interval.

setDefaultSchedule

Set the default publication interval to the specified interval.

operator BloombergLP::bslmf::NestedTraitDeclaration<PublicationScheduler, UsesBslmaAllocator>

Declare that this type uses a bslma allocator.

Friends

Name

Description

BloombergLP::balm::PublicationScheduler_Proctor

defined in implementation

Created with MrDocs