LegacyStateMachine

Legacy pure-Java StateMachine, used on JDK <23 or when the native shared-core library is unavailable/disabled. This is a deprecated fallback that will be removed in a future release; the native (FFM) state machine is the path that supports the latest Restate features.

Constructors

Link copied to clipboard
constructor(headersAccessor: HeadersAccessor, loggingContextSetter: EndpointRequestHandler.LoggingContextSetter)

Functions

Link copied to clipboard
open fun attachInvocation(invocationId: String): Int
Link copied to clipboard
Link copied to clipboard
open fun call(target: Target, payload: Slice, @Nullable idempotencyKey: @Nullable String, @Nullable scope: @Nullable String, @Nullable limitKey: @Nullable String, @Nullable headers: @Nullable Collection<Map.Entry<String, String>>): StateMachine.CallHandle
Link copied to clipboard
open fun cancelInvocation(targetInvocationId: String)
Link copied to clipboard
open fun close()
abstract fun close()
Link copied to clipboard
open fun completeAwakeable(awakeableId: String, value: Slice)
open fun completeAwakeable(awakeableId: String, exception: TerminalException)
Link copied to clipboard
open fun completeSignal(targetInvocationId: String, signalName: String, value: Slice)
open fun completeSignal(targetInvocationId: String, signalName: String, exception: TerminalException)
Link copied to clipboard
open fun createSignalHandle(signalName: String): Int
Link copied to clipboard
Make progress on the still-uncompleted await tree rooted at future, or return null when nothing is left to await (every node already resolved).
Link copied to clipboard
open fun end()
Link copied to clipboard
open fun getInvocationOutput(invocationId: String): Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun notifyError(throwable: Throwable)
Link copied to clipboard
open fun notifyInput(bytes: Slice)
Feed the next chunk of wire input.
Link copied to clipboard
Link copied to clipboard
open fun promiseComplete(key: String, value: Slice): Int
open fun promiseComplete(key: String, exception: TerminalException): Int
Link copied to clipboard
open fun promiseGet(key: String): Int
Link copied to clipboard
open fun promisePeek(key: String): Int
Link copied to clipboard
open fun proposeRunCompletion(handle: Int, value: Slice)
open fun proposeRunCompletion(handle: Int, terminalException: TerminalException)
open fun proposeRunCompletion(handle: Int, exception: Throwable, attemptDuration: Duration, @Nullable retryPolicy: @Nullable RetryPolicy)
Link copied to clipboard
Link copied to clipboard
open fun send(target: Target, payload: Slice, @Nullable idempotencyKey: @Nullable String, @Nullable scope: @Nullable String, @Nullable limitKey: @Nullable String, @Nullable headers: @Nullable Collection<Map.Entry<String, String>>, @Nullable delay: @Nullable Duration): Int
Link copied to clipboard
open fun sleep(duration: Duration, @Nullable name: @Nullable String): Int
Link copied to clipboard
Link copied to clipboard
open fun stateClear(key: String)
Link copied to clipboard
open fun stateClearAll()
Link copied to clipboard
open fun stateGet(key: String): Int
Link copied to clipboard
open fun stateGetKeys(): Int
Link copied to clipboard
open fun stateSet(key: String, bytes: Slice)
Link copied to clipboard
@Nullable
open fun takeNotification(handle: Int): @Nullable StateMachine.NotificationValue
Link copied to clipboard
open fun takeOutput(): Slice
Drain the next chunk of serialized output ready for the wire, or EMPTY when nothing is buffered.
Link copied to clipboard
open fun writeOutput(value: Slice)
open fun writeOutput(exception: TerminalException)