VLink  2.0.0
A high-performance communication middleware
vlink::Status::SampleRejected Struct Referencefinal

Reader-side event raised when an inbound sample is dropped due to a resource limit. More...

#include <status_detail.h>

Inheritance diagram for vlink::Status::SampleRejected:
Collaboration diagram for vlink::Status::SampleRejected:

Public Types

enum  Kind : uint8_t { kNotRejected = 0 , kRejectedByInstancesLimit = 1 , kRejectedBySamplesLimit = 2 , kRejectedBySamplesPerInstanceLimit = 3 }
 Reason codes describing which resource ceiling rejected the sample. More...
 

Public Member Functions

Type get_type () const override
 Returns kSampleRejected. More...
 
std::string get_string () const override
 Returns the literal "SampleRejected". More...
 

Public Attributes

int32_t total_count {0}
 Cumulative samples rejected. More...
 
int32_t total_count_change {0}
 Delta in total_count since the last notification. More...
 
Kind last_reason {kNotRejected}
 Reason code for the most recent rejection. More...
 
InstanceHandle last_instance_handle {nullptr}
 Opaque handle of the rejected instance. More...
 

Friends

VLINK_EXPORT friend std::ostream & operator<< (std::ostream &ostream, const SampleRejected &status) noexcept
 Streams the counter and reason fields to ostream. More...
 

Additional Inherited Members

Detailed Description

Reader-side event raised when an inbound sample is dropped due to a resource limit.

Member Enumeration Documentation

◆ Kind

Reason codes describing which resource ceiling rejected the sample.

Enumerator Meaning
kNotRejected placeholder; sample was not rejected
kRejectedByInstancesLimit max_instances exhausted
kRejectedBySamplesLimit max_samples exhausted
kRejectedBySamplesPerInstanceLimit max_samples_per_instance exhausted
Enumerator
kNotRejected 

Placeholder reason; no rejection occurred.

kRejectedByInstancesLimit 

Reader exhausted its instance budget.

kRejectedBySamplesLimit 

Reader exhausted its total-sample budget.

kRejectedBySamplesPerInstanceLimit 

Reader exhausted its per-instance budget.

Member Function Documentation

◆ get_string()

std::string vlink::Status::SampleRejected::get_string ( ) const
overridevirtual

Returns the literal "SampleRejected".

Returns
Event name string.

Implements vlink::Status::Base.

◆ get_type()

Type vlink::Status::SampleRejected::get_type ( ) const
overridevirtual

Returns kSampleRejected.

Returns
Status type discriminator.

Implements vlink::Status::Base.

Friends And Related Function Documentation

◆ operator<<

VLINK_EXPORT friend std::ostream& operator<< ( std::ostream &  ostream,
const SampleRejected status 
)
friend

Streams the counter and reason fields to ostream.

Parameters
ostreamOutput stream.
statusEvent to print.
Returns
Reference to ostream.

Member Data Documentation

◆ last_instance_handle

InstanceHandle vlink::Status::SampleRejected::last_instance_handle {nullptr}

Opaque handle of the rejected instance.

◆ last_reason

Kind vlink::Status::SampleRejected::last_reason {kNotRejected}

Reason code for the most recent rejection.

◆ total_count

int32_t vlink::Status::SampleRejected::total_count {0}

Cumulative samples rejected.

◆ total_count_change

int32_t vlink::Status::SampleRejected::total_count_change {0}

Delta in total_count since the last notification.


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