Object - streams : MaxForever

The aggregator to keep the maximum value received so far. It is similar to Max aggregator, but it keeps the maximum value it received so far, forever.

Methods

Fields

  • iMax int? ()
  • description

  • fMax float? ()
  • description

process

(anydata value, EventType eventType)

returns anydata

Updates the current maximum value and return the updated maximum value.

Parameters

  • value anydata
  • Value being checked whether it is greater than the current maximum value.

  • eventType EventType
  • Type of the incoming event streams:CURRENT, streams:EXPIRED or streams:RESET.

  • Return Type

    (anydata)
  • Updated maximum value.

copy

()

returns Aggregator

Returns a copy of the MaxForever aggregator.

  • Return Type

    (Aggregator)
  • A Aggregator object which represents MaxForever aggregator.

saveState

()

returns map

Return current state to be saved as a map of any typed values.

  • Return Type

    (map)
  • A map of any typed values.

restoreState

Restores the saved state which is passed as a map of any typed values.

Parameters

  • state map
  • A map of typed any values. This map contains the values to be restored from the persisted data.