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 longFor internal use only.final longFor internal use only.final ProvenanceBufferFor internal use only.final StringFor internal use only. -
Constructor Summary
ConstructorsConstructorDescriptionApiaryContext(ProvenanceBuffer provBuff, String service, long execID, long functionID) -
Method Summary
Modifier and TypeMethodDescriptionabstract FunctionOutputapiaryCallFunction(String name, Object... inputs) Synchronously invoke a function.apiaryQueueFunction(String name, Object... inputs) Queue a function for asynchronous execution.abstract FunctionOutputFor internal use only.getFunctionOutput(Object output) For internal use only.abstract voidrecordExecution(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
ApiaryFutureobject.
-
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
FunctionOutputobject 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.
-