Class AggregationRegistry


  • public class AggregationRegistry
    extends Object
    Stores a list of aggregations registered by the AggregationProvider, and provides a method for calling those aggregations.
    • Method Detail

      • getInstance

        public static AggregationRegistry getInstance()
        Get an instance of the AggregationRegistry.
        Returns:
        An instance of the AggregationRegistry
      • getAggregation

        public Aggregation getAggregation​(String name,
                                          ScalarValuedFunction[] arguments)
        Invoke an Aggregation by name, using the supplied arguments.
        Parameters:
        name - The registered name of the aggregation.
        arguments - The arguments to pass to the aggregation.
        Returns:
        The Aggregation.
      • getFunctionDescriptions

        public Collection<FunctionDescription> getFunctionDescriptions()
        Return a list of descriptions of all available aggregations.
        Returns:
      • getFunctionDescriptionsByCategory

        public Map<String,​Collection<FunctionDescription>> getFunctionDescriptionsByCategory()
        Returns a list of descriptions of all available aggregations, organized by category.
        Returns:
      • getFunctionDescription

        public FunctionDescription getFunctionDescription​(String name,
                                                          int argCount)
        Create a FunctionDescription for a given aggregation.
        Parameters:
        name - The name of the aggregation
        argCount - The number of arguments the aggregation takes
        Returns:
        The FunctionDescription of the aggregation