VLink 2.0.0
A high-performance communication middleware
载入中...
搜索中...
未找到
vlink::DiscoveryReporter类 参考

Background MessageLoop that reports active nodes to the discovery subsystem. 更多...

#include <discovery_reporter.h>

类 vlink::DiscoveryReporter 继承关系图:
vlink::DiscoveryReporter 的协作图:

Public 成员函数

 DiscoveryReporter ()
 Constructs the reporter and starts its background loop.
 ~DiscoveryReporter () override
 Destructor – sends an offline notification and stops the loop.
void add (NodeImpl *node)
 Registers a NodeImpl endpoint for periodic reporting.
void remove (NodeImpl *node)
 Unregisters a NodeImpl endpoint from periodic reporting.

静态 Public 成员函数

static DiscoveryReporterglobal_get ()
 Returns the process-global DiscoveryReporter singleton.

Protected 成员函数

size_t get_max_task_count () const override
 Returns the maximum queue depth.
uint32_t get_max_elapsed_time () const override
 Returns the maximum allowed task execution time in milliseconds.
void on_begin () override
 Called from the loop thread just before the first task is processed.
void on_end () override
 Called from the loop thread just after the last task has been processed.

额外继承的成员函数

 Queue implementation type. 更多...
 Idle strategy controlling CPU and latency trade-offs. 更多...
 Pre-defined task priority levels for kPriorityType loops. 更多...

详细描述

Background MessageLoop that reports active nodes to the discovery subsystem.

Automatically started and stopped by the VLink runtime. Callers should not need to manage this object directly unless building custom tooling.

构造及析构函数说明

◆ DiscoveryReporter()

vlink::DiscoveryReporter::DiscoveryReporter ( )

Constructs the reporter and starts its background loop.

这是这个函数的调用关系图:

◆ ~DiscoveryReporter()

vlink::DiscoveryReporter::~DiscoveryReporter ( )
override

Destructor – sends an offline notification and stops the loop.

成员函数说明

◆ add()

void vlink::DiscoveryReporter::add ( NodeImpl * node)

Registers a NodeImpl endpoint for periodic reporting.

Called automatically by NodeImpl on construction.

参数
nodeNode to add.

◆ get_max_elapsed_time()

uint32_t vlink::DiscoveryReporter::get_max_elapsed_time ( ) const
overrideprotectedvirtual

Returns the maximum allowed task execution time in milliseconds.

When a task exceeds this duration, on_task_timeout() is called. Returns 0 to disable timeout checking.

返回
Maximum execution time in ms.

重载 vlink::MessageLoop .

◆ get_max_task_count()

size_t vlink::DiscoveryReporter::get_max_task_count ( ) const
overrideprotectedvirtual

Returns the maximum queue depth.

返回
kMaxTaskSize (10000) by default.

重载 vlink::MessageLoop .

◆ global_get()

DiscoveryReporter * vlink::DiscoveryReporter::global_get ( )
static

Returns the process-global DiscoveryReporter singleton.

Created on first call. The singleton is destroyed when the process exits.

返回
Raw pointer to the global DiscoveryReporter.
函数调用图:

◆ on_begin()

void vlink::DiscoveryReporter::on_begin ( )
overrideprotectedvirtual

Called from the loop thread just before the first task is processed.

Override in subclasses to perform per-thread initialisation.

重载 vlink::MessageLoop .

◆ on_end()

void vlink::DiscoveryReporter::on_end ( )
overrideprotectedvirtual

Called from the loop thread just after the last task has been processed.

Override in subclasses to perform per-thread cleanup.

重载 vlink::MessageLoop .

函数调用图:

◆ remove()

void vlink::DiscoveryReporter::remove ( NodeImpl * node)

Unregisters a NodeImpl endpoint from periodic reporting.

Called automatically by NodeImpl on destruction.

参数
nodeNode to remove.

该类的文档由以下文件生成: