singleCycle

fun <X> singleCycle(localId: ID, messages: Collection<InboundMessage>, state: Set<State<*>>, compute: AggregateContext.() -> X): AggregateResult<X>

Execute a single cycle of the aggregate computation.

Parameters

localId

the id of the local node.

messages

the messages received from the other nodes.

state

the state of the local node.

compute

the function that compute the new state of the local node.