Class FunctionArguments
- java.lang.Object
-
- org.apache.cassandra.cql3.functions.FunctionArguments
-
-
Constructor Summary
Constructors Constructor Description FunctionArguments(ProtocolVersion version, ArgumentDeserializer... deserializers)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontainsNulls()Checks if at least one of the arguments is null.static FunctionArgumentsemptyInstance(ProtocolVersion version)Creates an emptyFunctionArguments.<T> Tget(int i)Returns the specified argumentProtocolVersiongetProtocolVersion()Returns the protocol versionstatic FunctionArgumentsnewInstanceForNativeFunction(ProtocolVersion version, java.util.List<AbstractType<?>> argTypes)Creates a newFunctionArgumentsfor a native function.static FunctionArgumentsnewInstanceForUdf(ProtocolVersion version, java.util.List<UDFDataType> argTypes)Creates a newFunctionArgumentsfor the specified types.static FunctionArgumentsnewNoopInstance(ProtocolVersion version, int numberOfArguments)Creates a newFunctionArgumentsthat does not deserialize the arguments.voidset(int i, java.nio.ByteBuffer buffer)Sets the specified value to the argumentsintsize()Returns the current number of arguments.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.cassandra.cql3.functions.Arguments
getAsBoolean, getAsByte, getAsDouble, getAsFloat, getAsInt, getAsLong, getAsShort
-
-
-
-
Constructor Detail
-
FunctionArguments
public FunctionArguments(ProtocolVersion version, ArgumentDeserializer... deserializers)
-
-
Method Detail
-
newInstanceForUdf
public static FunctionArguments newInstanceForUdf(ProtocolVersion version, java.util.List<UDFDataType> argTypes)
Creates a newFunctionArgumentsfor the specified types.- Parameters:
version- the protocol versionargTypes- the argument types- Returns:
- a new
FunctionArgumentsfor the specified types.
-
getProtocolVersion
public ProtocolVersion getProtocolVersion()
Description copied from interface:ArgumentsReturns the protocol version- Specified by:
getProtocolVersionin interfaceArguments- Returns:
- the protocol version
-
newNoopInstance
public static FunctionArguments newNoopInstance(ProtocolVersion version, int numberOfArguments)
Creates a newFunctionArgumentsthat does not deserialize the arguments.- Parameters:
version- the protocol versionnumberOfArguments- the number of argument- Returns:
- a new
FunctionArgumentsfor the specified types.
-
emptyInstance
public static FunctionArguments emptyInstance(ProtocolVersion version)
Creates an emptyFunctionArguments.- Parameters:
version- the protocol version- Returns:
- an empty
FunctionArguments
-
newInstanceForNativeFunction
public static FunctionArguments newInstanceForNativeFunction(ProtocolVersion version, java.util.List<AbstractType<?>> argTypes)
Creates a newFunctionArgumentsfor a native function.Native functions can use different
ArgumentDeserializerto avoid instanciating primitive wrappers.- Parameters:
version- the protocol versionargTypes- the argument types- Returns:
- a new
FunctionArgumentsfor the specified types.
-
set
public void set(int i, java.nio.ByteBuffer buffer)Description copied from interface:ArgumentsSets the specified value to the arguments
-
containsNulls
public boolean containsNulls()
Description copied from interface:ArgumentsChecks if at least one of the arguments is null.- Specified by:
containsNullsin interfaceArguments- Returns:
trueif at least one of the arguments is null,falseotherwise.
-
get
public <T> T get(int i)
Description copied from interface:ArgumentsReturns the specified argument
-
-