UDAggregate (apache-cassandra API)
Date: 2018-02-12

org.apache.cassandra.cql3.functions

## Class UDAggregate

- java.lang.Object
- - org.apache.cassandra.cql3.functions.AbstractFunction
  - - org.apache.cassandra.cql3.functions.UDAggregate

- All Implemented Interfaces:
    AssignmentTestable, AggregateFunction, Function

      public class UDAggregate
      extends AbstractFunction
      implements AggregateFunction

  Base class for user-defined-aggregates.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.apache.cassandra.cql3.functions.AggregateFunction

      `AggregateFunction.Aggregate`

    - ### Nested classes/interfaces inherited from interface org.apache.cassandra.cql3.AssignmentTestable

      `AssignmentTestable.TestResult`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.nio.ByteBuffer` | `initcond`
    `protected static org.slf4j.Logger` | `logger`
    `protected AbstractType<?>` | `stateType`

    - ### Fields inherited from class org.apache.cassandra.cql3.functions.AbstractFunction

      `argTypes, name, returnType`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `UDAggregate(FunctionName name, java.util.List<AbstractType<?>> argTypes, AbstractType<?> returnType, ScalarFunction stateFunc, ScalarFunction finalFunc, java.nio.ByteBuffer initcond)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static UDAggregate` | `create(FunctionName name, java.util.List<AbstractType<?>> argTypes, AbstractType<?> returnType, FunctionName stateFunc, FunctionName finalFunc, AbstractType<?> stateType, java.nio.ByteBuffer initcond)`
    `static UDAggregate` | `createBroken(FunctionName name, java.util.List<AbstractType<?>> argTypes, AbstractType<?> returnType, java.nio.ByteBuffer initcond, InvalidRequestException reason)`
    `boolean` | `equals(java.lang.Object o)`
    `ScalarFunction` | `finalFunction()`
    `java.lang.Iterable<Function>` | `getFunctions()`
    `int` | `hashCode()`
    `boolean` | `hasReferenceTo(Function function)`
    `java.nio.ByteBuffer` | `initialCondition()`
    `boolean` | `isAggregate()` Checks whether the function is an aggregate function or not.
    `boolean` | `isNative()` Checks whether the function is a native/hard coded one or not.
    `AggregateFunction.Aggregate` | `newAggregate()` Creates a new `Aggregate` instance.
    `ScalarFunction` | `stateFunction()`
    `AbstractType<?>` | `stateType()`

    - ### Methods inherited from class org.apache.cassandra.cql3.functions.AbstractFunction

      `argTypes, name, returnType, testAssignment, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.apache.cassandra.cql3.functions.Function

      `argTypes, name, returnType`

    - ### Methods inherited from interface org.apache.cassandra.cql3.AssignmentTestable

      `testAssignment`

- - ### Field Detail

    - #### logger

          protected static final org.slf4j.Logger logger

    - #### stateType

          protected final AbstractType<?> stateType

    - #### initcond

          protected final java.nio.ByteBuffer initcond

  - ### Constructor Detail

    - #### UDAggregate

          public UDAggregate(FunctionName name,
                             java.util.List<AbstractType<?>> argTypes,
                             AbstractType<?> returnType,
                             ScalarFunction stateFunc,
                             ScalarFunction finalFunc,
                             java.nio.ByteBuffer initcond)

  - ### Method Detail

    - #### create

          public static UDAggregate create(FunctionName name,
                                           java.util.List<AbstractType<?>> argTypes,
                                           AbstractType<?> returnType,
                                           FunctionName stateFunc,
                                           FunctionName finalFunc,
                                           AbstractType<?> stateType,
                                           java.nio.ByteBuffer initcond)
                                    throws InvalidRequestException

      Throws:
        `InvalidRequestException`

    - #### createBroken

          public static UDAggregate createBroken(FunctionName name,
                                                 java.util.List<AbstractType<?>> argTypes,
                                                 AbstractType<?> returnType,
                                                 java.nio.ByteBuffer initcond,
                                                 InvalidRequestException reason)

    - #### hasReferenceTo

          public boolean hasReferenceTo(Function function)

      Specified by:
        `hasReferenceTo` in interface `Function`
      Overrides:
        `hasReferenceTo` in class `AbstractFunction`

    - #### getFunctions

          public java.lang.Iterable<Function> getFunctions()

      Specified by:
        `getFunctions` in interface `Function`
      Overrides:
        `getFunctions` in class `AbstractFunction`

    - #### isAggregate

          public boolean isAggregate()

      Description copied from interface: `Function`
      Checks whether the function is an aggregate function or not.
      Specified by:
        `isAggregate` in interface `Function`
      Returns:
        `true` if the function is an aggregate function, `false` otherwise.

    - #### isNative

          public boolean isNative()

      Description copied from interface: `Function`
      Checks whether the function is a native/hard coded one or not.
      Specified by:
        `isNative` in interface `Function`
      Returns:
        `true` if the function is a native/hard coded one, `false` otherwise.

    - #### stateFunction

          public ScalarFunction stateFunction()

    - #### finalFunction

          public ScalarFunction finalFunction()

    - #### initialCondition

          public java.nio.ByteBuffer initialCondition()

    - #### stateType

          public AbstractType<?> stateType()

    - #### newAggregate

          public AggregateFunction.Aggregate newAggregate()
                                                   throws InvalidRequestException

      Description copied from interface: `AggregateFunction`
      Creates a new `Aggregate` instance.
      Specified by:
        `newAggregate` in interface `AggregateFunction`
      Returns:
        a new `Aggregate` instance.
      Throws:
        `InvalidRequestException`

    - #### equals

          public boolean equals(java.lang.Object o)

      Overrides:
        `equals` in class `AbstractFunction`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `AbstractFunction`

Copyright © 2018 The Apache Software Foundation