|
VLink 2.0.0
A high-performance communication middleware
|
Status event fired when an incoming sample is rejected due to a resource limit. 更多...
#include <status_detail.h>
Public 类型 | |
| enum | Kind : uint8_t { kNotRejected = 0 , kRejectedByInstancesLimit = 1 , kRejectedBySamplesLimit = 2 , kRejectedBySamplesPerInstanceLimit = 3 } |
| Reason codes for sample rejection. 更多... | |
Public 成员函数 | |
| Type | get_type () const override |
Returns kSampleRejected. | |
| std::string | get_string () const override |
| Returns a human-readable summary of this status. | |
| Public 成员函数 继承自 vlink::Status::Base | |
| template<typename T> | |
| std::shared_ptr< T > | as () const |
Safely downcasts this status to a concrete type T. | |
Public 属性 | |
| int32_t | total_count {0} |
| Total number of samples rejected. | |
| int32_t | total_count_change {0} |
| Change in total_count since last callback. | |
| Kind | last_reason {kNotRejected} |
| Reason for the most recent rejection. | |
| InstanceHandle | last_instance_handle {nullptr} |
| Handle of the instance that was most recently rejected. | |
友元 | |
| VLINK_EXPORT friend std::ostream & | operator<< (std::ostream &ostream, const SampleRejected &status) noexcept |
Writes the status fields to ostream. | |
额外继承的成员函数 | |
| Protected 成员函数 继承自 vlink::Status::Base | |
| Base () | |
| virtual | ~Base () |
Status event fired when an incoming sample is rejected due to a resource limit.
The Kind enum identifies which resource limit caused the rejection. last_reason and last_instance_handle describe the most recent rejection.
| enum vlink::Status::SampleRejected::Kind : uint8_t |
Reason codes for sample rejection.
| Kind | Limit exceeded |
|---|---|
| kNotRejected | Sample was not rejected |
| kRejectedByInstancesLimit | Max instances limit reached |
| kRejectedBySamplesLimit | Max total samples limit reached |
| kRejectedBySamplesPerInstanceLimit | Max samples per instance reached |
|
nodiscardoverridevirtual |
Returns a human-readable summary of this status.
实现了 vlink::Status::Base.
|
nodiscardoverridevirtual |
|
friend |
Writes the status fields to ostream.
| ostream | Output stream. |
| status | This SampleRejected status. |
ostream. | InstanceHandle vlink::Status::SampleRejected::last_instance_handle {nullptr} |
Handle of the instance that was most recently rejected.
| Kind vlink::Status::SampleRejected::last_reason {kNotRejected} |
Reason for the most recent rejection.
| int32_t vlink::Status::SampleRejected::total_count {0} |
Total number of samples rejected.
| int32_t vlink::Status::SampleRejected::total_count_change {0} |
Change in total_count since last callback.