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 boolean
containsNulls()
Checks if at least one of the arguments is null.static FunctionArguments
emptyInstance(ProtocolVersion version)
Creates an emptyFunctionArguments
.<T> T
get(int i)
Returns the specified argumentProtocolVersion
getProtocolVersion()
Returns the protocol versionstatic FunctionArguments
newInstanceForNativeFunction(ProtocolVersion version, java.util.List<AbstractType<?>> argTypes)
Creates a newFunctionArguments
for a native function.static FunctionArguments
newInstanceForUdf(ProtocolVersion version, java.util.List<UDFDataType> argTypes)
Creates a newFunctionArguments
for the specified types.static FunctionArguments
newNoopInstance(ProtocolVersion version, int numberOfArguments)
Creates a newFunctionArguments
that does not deserialize the arguments.void
set(int i, java.nio.ByteBuffer buffer)
Sets the specified value to the argumentsint
size()
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 newFunctionArguments
for the specified types.- Parameters:
version
- the protocol versionargTypes
- the argument types- Returns:
- a new
FunctionArguments
for the specified types.
-
getProtocolVersion
public ProtocolVersion getProtocolVersion()
Description copied from interface:Arguments
Returns the protocol version- Specified by:
getProtocolVersion
in interfaceArguments
- Returns:
- the protocol version
-
newNoopInstance
public static FunctionArguments newNoopInstance(ProtocolVersion version, int numberOfArguments)
Creates a newFunctionArguments
that does not deserialize the arguments.- Parameters:
version
- the protocol versionnumberOfArguments
- the number of argument- Returns:
- a new
FunctionArguments
for 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 newFunctionArguments
for a native function.Native functions can use different
ArgumentDeserializer
to avoid instanciating primitive wrappers.- Parameters:
version
- the protocol versionargTypes
- the argument types- Returns:
- a new
FunctionArguments
for the specified types.
-
set
public void set(int i, java.nio.ByteBuffer buffer)
Description copied from interface:Arguments
Sets the specified value to the arguments
-
containsNulls
public boolean containsNulls()
Description copied from interface:Arguments
Checks if at least one of the arguments is null.- Specified by:
containsNulls
in interfaceArguments
- Returns:
true
if at least one of the arguments is null,false
otherwise.
-
get
public <T> T get(int i)
Description copied from interface:Arguments
Returns the specified argument
-
-