| Constructor and Description |
|---|
FunctionsOnCantor(Cantor cantor) |
| Modifier and Type | Method and Description |
|---|---|
void |
create(String namespace)
Create a new function namespace.
|
void |
delete(String namespace,
String function)
Delete the function from the given namespace.
|
void |
drop(String namespace)
Drop a function namespace.
|
byte[] |
get(String namespace,
String function)
Retrieve the function body from the given namespace.
|
Collection<String> |
list(String namespace)
Get the list of all functions in the given namespace.
|
void |
run(String namespace,
String function,
Context context,
Map<String,String> params)
Execute the function, given the context and param arguments.
|
void |
store(String namespace,
String function,
byte[] body)
Store a function with the given name and body as byte array.
|
void |
store(String namespace,
String function,
String body)
Store a function with the given name and body as string.
|
public FunctionsOnCantor(Cantor cantor)
public void create(String namespace) throws IOException
Functionscreate in interface Functionsnamespace - the namespace identifierIOException - exception thrown from the underlying storage implementationpublic void drop(String namespace) throws IOException
Functionsdrop in interface Functionsnamespace - the namespace identifierIOException - exception thrown from the underlying storage implementationpublic void store(String namespace, String function, String body) throws IOException
Functionsstore in interface Functionsnamespace - the namespace identifierfunction - the function name identifierbody - body of the functionIOException - exception thrown from the underlying storage implementationpublic void store(String namespace, String function, byte[] body) throws IOException
Functionsstore in interface Functionsnamespace - the namespace identifierfunction - the function name identifierbody - body of the functionIOException - exception thrown from the underlying storage implementationpublic byte[] get(String namespace, String function) throws IOException
Functionsget in interface Functionsnamespace - the namespace identifierfunction - the function name identifierIOException - exception thrown from the underlying storage implementationpublic void delete(String namespace, String function) throws IOException
Functionsdelete in interface Functionsnamespace - the namespace identifierfunction - the function name identifierIOException - exception thrown from the underlying storage implementationpublic Collection<String> list(String namespace) throws IOException
Functionslist in interface Functionsnamespace - the namespace identifierIOException - exception thrown from the underlying storage implementationpublic void run(String namespace, String function, Context context, Map<String,String> params) throws IOException
Functionsrun in interface Functionsnamespace - the namespace identifierfunction - the function name identifiercontext - the context variables to pass to function on executionparams - the map of parameters to pass to function on executionIOException - exception thrown from the underlying storage implementationCopyright © 2021. All rights reserved.