Package com.rpl.rama

Interface Agg

All Superinterfaces:
AggOrCompoundAgg
All Known Subinterfaces:
TopMonotonicAgg

public interface Agg extends AggOrCompoundAgg
Used for specifying aggregators in Rama topologies in conjunction with agg or compoundAgg methods
See Also:
  • Method Details

    • captureNewValInto

      Agg captureNewValInto(String var)
      Captures updated value of aggregated location into var for post-agg phase of a batch block. Used with compoundAgg and only usable in batch blocks in microbatch topologies.
      Parameters:
      var - Var to capture
      See Also:
    • sum

      static Agg sum(Object arg)
      Sums input values into a java.lang.Long
      Parameters:
      arg - Value or var input
      Returns:
      Builder-style object to add options
    • count

      static Agg count()
      Counts input into a java.lang.Long
      Returns:
      Builder-style object to add options
    • average

      static Agg average(Object arg)
      Averages input into a java.lang.Long. Cannot be used for aggregation into an existing PState.
      Parameters:
      arg - Value or var input
      Returns:
      Builder-style object to add options
    • max

      static Agg max(Object arg)
      Computes maximum value from input
      Parameters:
      arg - Value or var input
      Returns:
      Builder-style object to add options
    • min

      static Agg min(Object arg)
      Computes minimum value from input
      Parameters:
      arg - Value or var input
      Returns:
      Builder-style object to add options
    • or

      static Agg or(Object arg)
      Applies "or" operator to all input. Null or boolean false values are considered "false", and all other values are considered "true". If any input is "true", aggregates to first "true" value seen. If all inputs are "false", aggregates to last "false" value seen. If no input, aggregates to boolean false.
      Parameters:
      arg - Value or var input
      Returns:
      Builder-style object to add options
    • and

      static Agg and(Object arg)
      Applies "and" operator to all input. Null or false values are considered "false", and all other values are considered "true". If all inputs are "true", aggregates to last "true" value seen. If any input is "false", aggregates to first "false" value seen. If no input, aggregates to boolean true.
      Parameters:
      arg - Value or var input
      Returns:
      Builder-style object to add options
    • voided

      static Agg voided()
      Aggregates to "void" value. Used to remove nested elements from existing PStates.
    • list

      static Agg list(Object arg)
      Aggregates all input to a java.util.List data structure.
      Parameters:
      arg - Value or var input
      Returns:
      Builder-style object to add options
    • set

      static Agg set(Object arg)
      Aggregates all input to a java.util.Set data structure.
      Parameters:
      arg - Value or var input
      Returns:
      Builder-style object to add options
    • map

      static Agg map(Object argKey, Object argVal)
      Aggregates all input to a java.util.Map data structure.
      Parameters:
      argKey - Value or var input for the key of an entry
      argVal - Value or var input for the value of an entry
      Returns:
      Builder-style object to add options
    • mergeMap

      static Agg mergeMap(Object arg)
      Aggregates input java.util.Maps together into a single java.util.Map by adding all key/value pairs of each input.
      Parameters:
      arg - Value or var input that must be a java.util.Map
      Returns:
      Builder-style object to add options
    • setRemove

      static Agg setRemove(Object arg)
      Aggregates to "void" value for the given java.util.Set element. Used to remove elements from Sets inside existing PStates.
    • multiSet

      static Agg multiSet(Object arg)
      Aggregates input values into a java.util.Map from value to count
      Parameters:
      arg - Value or var input
      Returns:
      Builder-style object to add options
    • last

      static Agg last(Object arg)
      Aggregates input to the last input seen
      Parameters:
      arg - Value or var input
      Returns:
      Builder-style object to add options
    • first

      static Agg first(Object arg)
      Aggregates input to the first input seen
      Parameters:
      arg - Value or var input
      Returns:
      Builder-style object to add options
    • topMonotonic

      static TopMonotonicAgg topMonotonic(int amt, String var)
      Aggregates input into a list of top elements. See this documentation page for more information.
      Parameters:
      amt - Number of elements to compute
      var - Var input
      Returns:
      Builder-style object to add sorting and other options
    • combiner

      static Agg combiner(RamaCombinerAgg combiner, Object arg)
      Use a custom combiner as an aggregator
      Parameters:
      combiner - Custom combiner implementation
      arg - Value or var input
      Returns:
      Builder-style object to add options
    • accumulator

      static Agg accumulator(RamaAccumulatorAgg0 accumulator)
      Use a custom accumulator of zero arguments as an aggregator. Arguments can be values or vars.
      Parameters:
      accumulator - Custom accumulator implementation
      Returns:
      Builder-style object to add options
    • accumulator

      static Agg accumulator(RamaAccumulatorAgg1 accumulator, Object arg0)
      Use a custom accumulator of one argument as an aggregator. Arguments can be values or vars.
      Parameters:
      accumulator - Custom accumulator implementation
      Returns:
      Builder-style object to add options
    • accumulator

      static Agg accumulator(RamaAccumulatorAgg2 accumulator, Object arg0, Object arg1)
      Use a custom accumulator of two arguments as an aggregator. Arguments can be values or vars.
      Parameters:
      accumulator - Custom accumulator implementation
      Returns:
      Builder-style object to add options
    • accumulator

      static Agg accumulator(RamaAccumulatorAgg3 accumulator, Object arg0, Object arg1, Object arg2)
      Use a custom accumulator of three arguments as an aggregator. Arguments can be values or vars.
      Parameters:
      accumulator - Custom accumulator implementation
      Returns:
      Builder-style object to add options
    • accumulator

      static Agg accumulator(RamaAccumulatorAgg4 accumulator, Object arg0, Object arg1, Object arg2, Object arg3)
      Use a custom accumulator of four arguments as an aggregator. Arguments can be values or vars.
      Parameters:
      accumulator - Custom accumulator implementation
      Returns:
      Builder-style object to add options
    • accumulator

      static Agg accumulator(RamaAccumulatorAgg5 accumulator, Object arg0, Object arg1, Object arg2, Object arg3, Object arg4)
      Use a custom accumulator of five arguments as an aggregator. Arguments can be values or vars.
      Parameters:
      accumulator - Custom accumulator implementation
      Returns:
      Builder-style object to add options
    • accumulator

      static Agg accumulator(RamaAccumulatorAgg6 accumulator, Object arg0, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5)
      Use a custom accumulator of six arguments as an aggregator. Arguments can be values or vars.
      Parameters:
      accumulator - Custom accumulator implementation
      Returns:
      Builder-style object to add options
    • accumulator

      static Agg accumulator(RamaAccumulatorAgg7 accumulator, Object arg0, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6)
      Use a custom accumulator of seven arguments as an aggregator. Arguments can be values or vars.
      Parameters:
      accumulator - Custom accumulator implementation
      Returns:
      Builder-style object to add options
    • accumulator

      static Agg accumulator(RamaAccumulatorAgg8 accumulator, Object arg0, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7)
      Use a custom accumulator of eight arguments as an aggregator. Arguments can be values or vars.
      Parameters:
      accumulator - Custom accumulator implementation
      Returns:
      Builder-style object to add options