Class AggregatorRegistry

    • Field Detail

      • AGGREGATOR_REQUEST_REGEX

        public static final String AGGREGATOR_REQUEST_REGEX
        Regex pattern that defines the aggregator request syntax.
        See Also:
        Constant Field Values
    • Constructor Detail

      • AggregatorRegistry

        public AggregatorRegistry()
        Construct an AggregatorRegistry.

        By default the following built-in aggregators will be registered:

        • big-decimal-average
        • big-decimal-max
        • big-decimal-min
        • big-decimal-sum
        • comparable-max
        • comparable-min
        • count
        • distinct-values
        • double-average
        • double-max
        • double-min
        • double-sum
        • long-max
        • long-min
        • long-sum
      • AggregatorRegistry

        public AggregatorRegistry​(Collection<AggregatorConfig> colConfig)
        Construct an AggregatorRegistry that includes built-in aggregators in addition to the specified aggregators.
        Parameters:
        colConfig - aggregator configurations
    • Method Detail

      • getAggregator

        public InvocableMap.EntryAggregator getAggregator​(String sRequest)
        Returns a configured aggregator.
        Parameters:
        sRequest - the aggregator request
        Returns:
        aggregator
      • register

        public void register​(String sName,
                             AggregatorFactory factory)
        Register an aggregator factory with the given name.
        Parameters:
        sName - the aggregator name
        factory - the aggregator factory
      • register

        public void register​(String sName,
                             Class clz)
        Register an aggregator or aggregator factory with the given name.

        A DefaultAggregatorFactory will be used if the clz parameter is a class that implements InvocableMap.EntryAggregator.

        Parameters:
        sName - the aggregator name
        clz - the aggregator or aggregator factory class
      • register

        public void register​(Collection<AggregatorConfig> colConfig)
        Register a collection of aggregators.
        Parameters:
        colConfig - the aggregator configurations