Class ApiaryContext

java.lang.Object
org.dbos.apiary.function.ApiaryContext
Direct Known Subclasses:
ApiaryStatelessContext, ApiaryTransactionalContext

public abstract class ApiaryContext extends Object
ApiaryContext provides APIs to invoke other functions and run queries.
  • Field Details

    • provBuff

      public final ProvenanceBuffer provBuff
      For internal use only.
    • service

      public final String service
      For internal use only.
    • execID

      public final long execID
      For internal use only.
    • functionID

      public final long functionID
      For internal use only.
  • Constructor Details

    • ApiaryContext

      public ApiaryContext(ProvenanceBuffer provBuff, String service, long execID, long functionID)
  • Method Details

    • apiaryQueueFunction

      public ApiaryFuture apiaryQueueFunction(String name, Object... inputs)
      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

      public abstract FunctionOutput apiaryCallFunction(String name, Object... inputs)
      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

      public abstract FunctionOutput checkPreviousExecution()
      For internal use only.
      Returns:
      FunctionOutput
    • recordExecution

      public abstract void recordExecution(FunctionOutput output)
      For internal use only.
      Parameters:
      output - the finalized output of a function.
    • getFunctionOutput

      public FunctionOutput getFunctionOutput(Object output)
      For internal use only.
      Parameters:
      output - the original output of a function.
      Returns:
      the finalized output of a function.