Interface StateMachine

All Superinterfaces:
Flow.Processor<dev.restate.common.Slice,dev.restate.common.Slice>, Flow.Publisher<dev.restate.common.Slice>, Flow.Subscriber<dev.restate.common.Slice>

public interface StateMachine extends Flow.Processor<dev.restate.common.Slice,dev.restate.common.Slice>
More or less same as the VM trait
  • Method Details

    • init

      static StateMachine init(dev.restate.sdk.endpoint.HeadersAccessor headersAccessor, EndpointRequestHandler.LoggingContextSetter loggingContextSetter)
    • getResponseContentType

      String getResponseContentType()
    • waitForReady

      CompletableFuture<Void> waitForReady()
    • waitNextInputSignal

      CompletableFuture<Void> waitNextInputSignal()
    • doProgress

    • isCompleted

      boolean isCompleted(int handle)
    • takeNotification

      Optional<NotificationValue> takeNotification(int handle)
    • input

      @Nullable StateMachine.Input input()
    • stateGet

      int stateGet(String key)
    • stateGetKeys

      int stateGetKeys()
    • stateSet

      void stateSet(String key, dev.restate.common.Slice bytes)
    • stateClear

      void stateClear(String key)
    • stateClearAll

      void stateClearAll()
    • sleep

      int sleep(Duration duration, String name)
    • call

      StateMachine.CallHandle call(dev.restate.common.Target target, dev.restate.common.Slice payload, @Nullable String idempotencyKey, @Nullable Collection<Map.Entry<String,String>> headers)
    • send

      int send(dev.restate.common.Target target, dev.restate.common.Slice payload, @Nullable String idempotencyKey, @Nullable Collection<Map.Entry<String,String>> headers, @Nullable Duration delay)
    • awakeable

    • completeAwakeable

      void completeAwakeable(String awakeableId, dev.restate.common.Slice value)
    • completeAwakeable

      void completeAwakeable(String awakeableId, dev.restate.sdk.common.TerminalException exception)
    • createSignalHandle

      int createSignalHandle(String signalName)
    • completeSignal

      void completeSignal(String targetInvocationId, String signalName, dev.restate.common.Slice value)
    • completeSignal

      void completeSignal(String targetInvocationId, String signalName, dev.restate.sdk.common.TerminalException exception)
    • promiseGet

      int promiseGet(String key)
    • promisePeek

      int promisePeek(String key)
    • promiseComplete

      int promiseComplete(String key, dev.restate.common.Slice value)
    • promiseComplete

      int promiseComplete(String key, dev.restate.sdk.common.TerminalException exception)
    • run

      int run(String name)
    • proposeRunCompletion

      void proposeRunCompletion(int handle, dev.restate.common.Slice value)
    • proposeRunCompletion

      void proposeRunCompletion(int handle, Throwable exception, Duration attemptDuration, dev.restate.sdk.common.RetryPolicy retryPolicy)
    • cancelInvocation

      void cancelInvocation(String targetInvocationId)
    • attachInvocation

      int attachInvocation(String invocationId)
    • getInvocationOutput

      int getInvocationOutput(String invocationId)
    • writeOutput

      void writeOutput(dev.restate.common.Slice value)
    • writeOutput

      void writeOutput(dev.restate.sdk.common.TerminalException exception)
    • end

      void end()
    • state