VariantStreamSubscription
VariantStreamSubscription
Inherited by StreamSubscription< To >, StreamSubscription< From >, StreamSubscription< T >
Public Functions
| Name | |
|---|---|
| virtual | ~VariantStreamSubscription() |
| virtual int | dataTypeId() const =0 |
| virtual QString | dataTypeName() const =0 |
| virtual bool | callIfNextVar(const ProcessVarFn & fn) =0 |
| virtual bool | unsubscribe() =0 |
| virtual bool | isActive() const =0 |
| virtual bool | hasPending() const =0 |
| virtual size_t | approxPendingCount() const =0 |
| virtual ssize_t | approxItemMemSize() const =0 Approximate in-memory size of a single queued item, in bytes. |
| virtual int | enableNotify() =0 |
| virtual void | disableNotify() =0 |
| virtual void | acknowledgeNotify() =0 Acknowledge an eventfd notification after the fd became readable. |
| virtual void | rearmNotifyIfPending() =0 Re-arm the eventfd if there is still undrained data. |
| virtual void | setThrottleItemsPerSec(uint itemsPerSec, bool allowMore =true) =0 |
| virtual void | suspend() =0 |
| virtual void | resume() =0 |
| virtual void | clearPending() =0 |
| virtual MetaStringMap | metadata() const =0 |
| virtual MetaValue | metadataValue(const QString & key, const MetaValue & defaultValue =nullptr) const =0 |
| virtual MetaValue | metadataValue(CommonMetadataKey key, const MetaValue & defaultValue =nullptr) const =0 |
| virtual void | forcePushNullopt() =0 |
| virtual std::shared_ptr< VariantStreamSubscription > | sourceSubscriptionVar() If this subscription is a type-conversion view, return the underlying source-typed subscription it adapts; otherwise return nullptr. |
Public Functions Documentation
function ~VariantStreamSubscription
virtual ~VariantStreamSubscription()function dataTypeId
virtual int dataTypeId() const =0Reimplemented by: StreamSubscription::dataTypeId, StreamSubscription::dataTypeId, StreamSubscription::dataTypeId
function dataTypeName
virtual QString dataTypeName() const =0Reimplemented by: StreamSubscription::dataTypeName, StreamSubscription::dataTypeName, StreamSubscription::dataTypeName
function callIfNextVar
virtual bool callIfNextVar(
const ProcessVarFn & fn
) =0Reimplemented by: StreamSubscription::callIfNextVar, StreamSubscription::callIfNextVar, StreamSubscription::callIfNextVar, StreamSubscriptionAdapter::callIfNextVar
function unsubscribe
virtual bool unsubscribe() =0Reimplemented by: StreamSubscription::unsubscribe, StreamSubscription::unsubscribe, StreamSubscription::unsubscribe, StreamSubscriptionAdapter::unsubscribe
function isActive
virtual bool isActive() const =0Reimplemented by: StreamSubscription::isActive, StreamSubscription::isActive, StreamSubscription::isActive, StreamSubscriptionAdapter::isActive
function hasPending
virtual bool hasPending() const =0Reimplemented by: StreamSubscription::hasPending, StreamSubscription::hasPending, StreamSubscription::hasPending, StreamSubscriptionAdapter::hasPending
function approxPendingCount
virtual size_t approxPendingCount() const =0Reimplemented by: StreamSubscription::approxPendingCount, StreamSubscription::approxPendingCount, StreamSubscription::approxPendingCount, StreamSubscriptionAdapter::approxPendingCount
function approxItemMemSize
virtual ssize_t approxItemMemSize() const =0Approximate in-memory size of a single queued item, in bytes.
Reimplemented by: StreamSubscription::approxItemMemSize, StreamSubscription::approxItemMemSize, StreamSubscription::approxItemMemSize, StreamSubscriptionAdapter::approxItemMemSize
Sampled once from a real item as it passes through the stream, so the overload monitor can weight the pending count by actual memory pressure. Returns < 0 if no real size is known yet or the data type does not report one (see BaseDataType::memorySize()).
function enableNotify
virtual int enableNotify() =0Reimplemented by: StreamSubscription::enableNotify, StreamSubscription::enableNotify, StreamSubscription::enableNotify, StreamSubscriptionAdapter::enableNotify
function disableNotify
virtual void disableNotify() =0Reimplemented by: StreamSubscription::disableNotify, StreamSubscription::disableNotify, StreamSubscription::disableNotify, StreamSubscriptionAdapter::disableNotify
function acknowledgeNotify
virtual void acknowledgeNotify() =0Acknowledge an eventfd notification after the fd became readable.
Reimplemented by: StreamSubscription::acknowledgeNotify, StreamSubscription::acknowledgeNotify, StreamSubscription::acknowledgeNotify, StreamSubscriptionAdapter::acknowledgeNotify
Consumers must call this when their watched eventfd wakes them. It drains the fd and clears the coalesced-wakeup flag, so the next push will write the eventfd again.
function rearmNotifyIfPending
virtual void rearmNotifyIfPending() =0Re-arm the eventfd if there is still undrained data.
Reimplemented by: StreamSubscription::rearmNotifyIfPending, StreamSubscription::rearmNotifyIfPending, StreamSubscription::rearmNotifyIfPending, StreamSubscriptionAdapter::rearmNotifyIfPending
Consumers that process only a bounded batch of items per wakeup must call this after the batch, so the coalesced eventfd wakes them again until the queue is fully drained. A no-op if nothing is pending.
function setThrottleItemsPerSec
virtual void setThrottleItemsPerSec(
uint itemsPerSec,
bool allowMore =true
) =0Reimplemented by: StreamSubscription::setThrottleItemsPerSec, StreamSubscription::setThrottleItemsPerSec, StreamSubscription::setThrottleItemsPerSec, StreamSubscriptionAdapter::setThrottleItemsPerSec
function suspend
virtual void suspend() =0Reimplemented by: StreamSubscription::suspend, StreamSubscription::suspend, StreamSubscription::suspend, StreamSubscriptionAdapter::suspend
function resume
virtual void resume() =0Reimplemented by: StreamSubscription::resume, StreamSubscription::resume, StreamSubscription::resume, StreamSubscriptionAdapter::resume
function clearPending
virtual void clearPending() =0Reimplemented by: StreamSubscription::clearPending, StreamSubscription::clearPending, StreamSubscription::clearPending, StreamSubscriptionAdapter::clearPending
function metadata
virtual MetaStringMap metadata() const =0Reimplemented by: StreamSubscription::metadata, StreamSubscription::metadata, StreamSubscription::metadata, StreamSubscriptionAdapter::metadata
function metadataValue
virtual MetaValue metadataValue(
const QString & key,
const MetaValue & defaultValue =nullptr
) const =0Reimplemented by: StreamSubscription::metadataValue, StreamSubscriptionAdapter::metadataValue
function metadataValue
virtual MetaValue metadataValue(
CommonMetadataKey key,
const MetaValue & defaultValue =nullptr
) const =0Reimplemented by: StreamSubscription::metadataValue, StreamSubscriptionAdapter::metadataValue
function forcePushNullopt
virtual void forcePushNullopt() =0Reimplemented by: StreamSubscription::forcePushNullopt, StreamSubscription::forcePushNullopt, StreamSubscription::forcePushNullopt, StreamSubscriptionAdapter::forcePushNullopt
function sourceSubscriptionVar
inline virtual std::shared_ptr< VariantStreamSubscription > sourceSubscriptionVar()If this subscription is a type-conversion view, return the underlying source-typed subscription it adapts; otherwise return nullptr.
Reimplemented by: StreamSubscriptionAdapter::sourceSubscriptionVar
Used by the IPC stream exporter to serialize the source’s native type onto the wire (so cross-process consumers with different but compatible declared input types each get correctly-decoded samples).
Updated on 2026-06-08 at 21:50:10 +0000