Class NativeFunctions
- java.lang.Object
-
- org.apache.cassandra.cql3.functions.NativeFunctions
-
public class NativeFunctions extends java.lang.Object
A container of native functions. It stores both pre-built function overloads (NativeFunction
) and dynamic generators of functions (FunctionFactory
).
-
-
Field Summary
Fields Modifier and Type Field Description static NativeFunctions
instance
-
Constructor Summary
Constructors Constructor Description NativeFunctions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(FunctionFactory factory)
void
add(NativeFunction function)
void
addAll(NativeFunction... functions)
java.util.Collection<FunctionFactory>
getFactories()
java.util.Collection<FunctionFactory>
getFactories(FunctionName name)
Returns all the registered functions factories with the specified name.java.util.Collection<NativeFunction>
getFunctions()
java.util.Collection<NativeFunction>
getFunctions(FunctionName name)
Returns all the registered pre-built functions overloads with the specified name.boolean
hasFactory(FunctionName name)
Returns whether there is a function factory with the specified name.
-
-
-
Field Detail
-
instance
public static NativeFunctions instance
-
-
Method Detail
-
add
public void add(NativeFunction function)
-
addAll
public void addAll(NativeFunction... functions)
-
add
public void add(FunctionFactory factory)
-
getFunctions
public java.util.Collection<NativeFunction> getFunctions(FunctionName name)
Returns all the registered pre-built functions overloads with the specified name.- Parameters:
name
- a function name- Returns:
- the pre-built functions with the specified name
-
getFunctions
public java.util.Collection<NativeFunction> getFunctions()
- Returns:
- all the registered pre-built functions.
-
getFactories
public java.util.Collection<FunctionFactory> getFactories(FunctionName name)
Returns all the registered functions factories with the specified name.- Parameters:
name
- a function name- Returns:
- the function factories with the specified name
-
getFactories
public java.util.Collection<FunctionFactory> getFactories()
- Returns:
- all the registered functions factories.
-
hasFactory
public boolean hasFactory(FunctionName name)
Returns whether there is a function factory with the specified name.- Parameters:
name
- a function name- Returns:
true
if there is a factory with the specified name,false
otherwise
-
-