userver: ydb::TopicWriterManager Class Reference
Loading...
Searching...
No Matches
ydb::TopicWriterManager Class Referencefinal

#include <userver/ydb/topic_writer.hpp>

Detailed Description

Manages a collection of named YDB topic writers.

Provides access to individual TopicWriter instances by name, and aggregates their statistics.

Definition at line 120 of file topic_writer.hpp.

Public Member Functions

 TopicWriterManager (std::unordered_map< std::string, TopicWriterSettings > settings)
 Constructs a TopicWriterManager with the given per-topic settings.
 
TopicWriterGetTopicWriter (std::string_view name)
 Returns the topic writer for the provided name.
 

Constructor & Destructor Documentation

◆ TopicWriterManager()

ydb::TopicWriterManager::TopicWriterManager ( std::unordered_map< std::string, TopicWriterSettings > settings)
explicit

Constructs a TopicWriterManager with the given per-topic settings.

Parameters
settingsmap from topic writer name to its settings; the keys become the names used to look up writers via GetTopicWriter

Member Function Documentation

◆ GetTopicWriter()

TopicWriter & ydb::TopicWriterManager::GetTopicWriter ( std::string_view name)

Returns the topic writer for the provided name.

Parameters
namekey that was used in the settings map passed to the constructor; determines which topic writer is returned
Returns
reference to the particular topic writer, or throws an exception no topic writer with the specified name

Friends And Related Symbol Documentation

◆ DumpMetric

void DumpMetric ( utils::statistics::Writer & writer,
const TopicWriterManager & manager )
friend

Dumps aggregated metrics for all topic writers into the statistics writer.

Parameters
writerstatistics writer to dump into
managerthe topic writer manager whose metrics to dump

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