Querier class
A zenoh querier for efficiently sending multiple queries on a single key expression with pre-configured options.
Wraps z_owned_querier_t. Call close when done to undeclare the
querier and release native resources.
This object holds a native handle, so it cannot cross an isolate
boundary: a copy would share this one's native address while carrying
its own fresh disposal flag, and the second release would be a
use-after-free. Sending it throws ArgumentError naming the class.
⛔ No NativeFinalizer is attached to this class, deliberately: a
get() hands the caller a Stream<Reply> whose listener captures the port
and controller, NOT the querier — so the querier is unreferenced while its
query is in flight, and releasing it there terminates the get with zero
replies.
Releasing it explicitly is therefore the only thing that reclaims it.
- Implemented types
Constructors
-
Querier.declare(Pointer<
Void> loanedSession, Pointer<Void> loanedKeyExpr, String keyExpr, {QueryTarget target = QueryTarget.bestMatching, ConsolidationMode consolidation = ConsolidationMode.auto, Duration? timeout, CongestionControl? congestionControl, Priority? priority, bool? isExpress, Locality? allowedDestination, ReplyKeyExpr? acceptReplies, bool enableMatchingListener = false}) -
Creates a querier on the given session and key expression.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- keyExpr → String
-
The key expression this querier is declared on.
no setter
-
matchingStatus
→ Stream<
bool> ? -
A stream of matching status changes, or null if the matching listener
was not enabled when the querier was declared.
⚠️ Unbounded, like every push stream here — but this is an
edge-signal channel, not a data channel: it carries transitions, not
traffic, so there is deliberately no bounded form of it.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
close(
) → void - Undeclares the querier and releases native resources.
-
get(
{String? parameters, ZBytes? payload, Encoding? encoding, ZBytes? attachment, bool retainPayload = false}) → Stream< Reply> - Sends a query via this querier and returns a stream of replies.
-
hasMatchingQueryables(
) → bool - Returns whether any queryables currently match this querier's key expression.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pullGet(
{required ChannelKind kind, required int capacity, String? parameters, ZBytes? payload, Encoding? encoding, ZBytes? attachment, bool retainPayload = false}) → PullReplies - Sends a query via this querier, with replies landing in a bounded channel instead of a stream.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited