LocalSignalSender

class LocalSignalSender(node: String, registry: WaitRegistry, service: String? = null, remote: SignalSender = DROP) : SignalSender

The in-process SignalSender: a signal whose origin is this node of this service goes straight to its registry; any other goes to remote, the sender to other nodes' internal signal entries (and 6.6), which drops it by default.

A node id is unique within its service only (its lease groups are the service's), so two services may both have a node-1 when their ids are configured: the origin's service must match too, or a signal for another service's wait would be dropped here. Without a service, the node id alone decides, for a node that serves no other service's waits.

Constructors

Link copied to clipboard
constructor(node: String, registry: WaitRegistry, service: String? = null, remote: SignalSender = DROP)

Functions

Link copied to clipboard
open suspend override fun send(origin: Origin, signal: WaitSignal, deadline: Long)

Delivers signal to origin, while its wait lasts: until deadline, in epoch milliseconds.

Link copied to clipboard
open suspend override fun sendAll(origin: Origin, signals: List<WaitSignal>, deadline: Long)

Delivers signals to origin together and in their order, while their wait lasts: results a wait must take in that order, such as the hop a duplicate reached before its commit, which ends its wait (#7324). A sender that crosses the network sends them in one request, so two requests cannot reorder them; by default, one after the other.