Module accum

Module accum 

Source
Expand description

Defines the accumulator trait and some common accumulators.

Structs§

GCounterUpdate
State for a grow-only distributed counter (GCounter CRDT).
Max
Re-export Max from algebra. Newtype wrapper for an Ord type where join is max.
Min
Re-export Min from algebra. Newtype wrapper for an Ord type where join is min.
PNCounterUpdate
State for an increment/decrement distributed counter (PNCounter CRDT).
ReducerFactory
A factory for ErasedCommReducers. This is used to register a ErasedCommReducer type. We cannot register ErasedCommReducer trait object directly because the object could have internal state, and cannot be shared.
ReducerSpec
Serializable information needed to build a comm reducer.
StreamingReducerOpts
Options for streaming reducer mode.
WatermarkUpdate
Update from ranks for watermark accumulator using Last-Writer-Wins CRDT.

Enums§

ReducerMode
The mode in which a reducer operates.

Traits§

Accumulator
An accumulator is a object that accumulates updates into a state.
CommReducer
Commutative reducer for an accumulator. This is used to coallesce updates. For example, if the accumulator is a sum, its reducer calculates and returns the sum of 2 updates. This is helpful in split ports, where a large number of updates can be reduced into a smaller number of updates before being sent to the parent port.
ErasedCommReducer
Type erased version of CommReducer.

Functions§

join_semilattice
Create an accumulator for any JoinSemilattice type.
sum
Accumulate the sum of received updates.