Package org.dbos.apiary.function
Class ApiaryContext
java.lang.Object
org.dbos.apiary.function.ApiaryContext
- Direct Known Subclasses:
ApiaryStatelessContext
,ApiaryTransactionalContext
ApiaryContext provides APIs to invoke other functions and run queries.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal long
For internal use only.final long
For internal use only.final ProvenanceBuffer
For internal use only.final String
For internal use only. -
Constructor Summary
ConstructorsConstructorDescriptionApiaryContext
(ProvenanceBuffer provBuff, String service, long execID, long functionID) -
Method Summary
Modifier and TypeMethodDescriptionabstract FunctionOutput
apiaryCallFunction
(String name, Object... inputs) Synchronously invoke a function.apiaryQueueFunction
(String name, Object... inputs) Queue a function for asynchronous execution.abstract FunctionOutput
For internal use only.getFunctionOutput
(Object output) For internal use only.abstract void
recordExecution
(FunctionOutput output) For internal use only.
-
Field Details
-
provBuff
For internal use only. -
service
For internal use only. -
execID
public final long execIDFor internal use only. -
functionID
public final long functionIDFor internal use only.
-
-
Constructor Details
-
ApiaryContext
-
-
Method Details
-
apiaryQueueFunction
Queue a function for asynchronous execution.- Parameters:
name
- the name of the invoked function.inputs
- the list of arguments provided to the invoked function.- Returns:
- an
ApiaryFuture
object.
-
apiaryCallFunction
Synchronously invoke a function.- Parameters:
name
- the fully-qualified name of the invoked function.inputs
- the list of arguments provided to the invoked function.- Returns:
- an
FunctionOutput
object that stores the output from a function.
-
checkPreviousExecution
For internal use only.- Returns:
FunctionOutput
-
recordExecution
For internal use only.- Parameters:
output
- the finalized output of a function.
-
getFunctionOutput
For internal use only.- Parameters:
output
- the original output of a function.- Returns:
- the finalized output of a function.
-