Object - streams : Aggregator

Abstract object, which should be implemented in order to create a new aggregator.

copy

()

returns Aggregator

Returns a copy of self, but it does not contain the current state.

process

(anydata value, EventType eventType)

returns anydata

Updates the aggregated value and returns the final aggregated value.

Parameters

  • value anydata
  • value being aggregated.

  • eventType EventType
  • Type of the incoming event streams:CURRENT, streams:EXPIRED or streams:RESET. Based on the type of the event value will be added to the aggregation or removed from the aggregation.

  • Return Type

    (anydata)
  • Updated aggregated value after value being aggregated.