ForwardEndpoint
class ForwardEndpoint(coordinator: WaitCoordinator, models: Collection<AggregateModel<*>>, groups: Collection<PartitionOwnership>, clock: Clock = Clock.systemUTC(), observer: Observer = Observer.NONE) : ClusterChannelHandler
What a node serves on the cluster channel: it executes the commands other nodes forward to it through coordinator (so its own wait context goes on with the command and later hops signal the origin), for the aggregates of models.
It takes a command for a partition it accepts, counted for the partition's hand-off, or one it is about to own (PartitionOwnership.pending); a command of a context without a group in groups runs as under Local. It refuses a partition it neither holds nor is about to hold, a forward past its deadline, and a type it does not know; the sender then runs the command itself. It never forwards again.
The command executes in the trace its forward's transport carries (ForwardCommand.transport), which observer resumes.
Constructors
Link copied to clipboard
constructor(coordinator: WaitCoordinator, models: Collection<AggregateModel<*>>, groups: Collection<PartitionOwnership>, clock: Clock = Clock.systemUTC(), observer: Observer = Observer.NONE)