You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The new method can be used instead of conn:watch() in case the caller
only needs to retrieve the current associated with a notification key
value without subscribing to future changes.
The method can also take a net.box options table as a second argument.
It supports all the standard request options: is_async, return_raw, timeout, and others. They work exactly in the same way as with other
net.box method, for example conn:call. For example,
Like conn:watch(), the new method doesn't require authentication.
Like conn:watch(), the new method can be executed in a stream
(see conn:new_stream()), but it isn't streamlined (i.e. calling it
as a stream method has the same effect as calling it as a connection
method).
The net.box connection will set conn.peer_protocol_features.watch_once
to true if the remote end supports conn:watch_once().
Product: Tarantool
Since: 3.0
Root document: https://www.tarantool.io/en/doc/latest/dev_guide/internals/iproto/requests/
https://www.tarantool.io/en/doc/latest/reference/reference_lua/net_box/
https://www.tarantool.io/en/doc/latest/reference/reference_lua/box_events/
SME: @ locker
Details
The new method takes a notification key and returns the value currently
associated with it.
For example, let's assume that a Tarantool server was started with the
following script:
Then the
conn:watch_once()
method would yield the following results:The new method can be used instead of
conn:watch()
in case the calleronly needs to retrieve the current associated with a notification key
value without subscribing to future changes.
The method can also take a net.box options table as a second argument.
It supports all the standard request options:
is_async
,return_raw
,timeout
, and others. They work exactly in the same way as with othernet.box method, for example
conn:call
. For example,Like
conn:watch()
, the new method doesn't require authentication.Like
conn:watch()
, the new method can be executed in a stream(see
conn:new_stream()
), but it isn't streamlined (i.e. calling itas a stream method has the same effect as calling it as a connection
method).
The net.box connection will set
conn.peer_protocol_features.watch_once
to true if the remote end supports
conn:watch_once()
.The new method is implemented using the
IPROTO_WATCH_ONCE
request.Requested by @locker in tarantool/tarantool@41af325.
The text was updated successfully, but these errors were encountered: