Syscalls

interface Syscalls

Internal interface to access Restate functionalities. Users can use the ad-hoc RestateContext interfaces provided by the various implementations.

When using executor switching wrappers, the method's callback will be executed in the state machine executor.

Functions

Link copied to clipboard
Link copied to clipboard
abstract fun call(target: Target, parameter: ByteBuffer, callback: SyscallCallback<Deferred<ByteBuffer>>)
Link copied to clipboard
abstract fun clear(name: String, callback: SyscallCallback<Void>)
Link copied to clipboard
abstract fun clearAll(callback: SyscallCallback<Void>)
Link copied to clipboard
abstract fun createAllDeferred(children: List<Deferred<out Any>>): Deferred<Void>
Link copied to clipboard
abstract fun createAnyDeferred(children: List<Deferred<out Any>>): Deferred<Integer>
Link copied to clipboard
abstract fun enterSideEffectBlock(@Nullable name: @Nullable String, callback: EnterSideEffectSyscallCallback)
Link copied to clipboard
Link copied to clipboard
abstract fun exitSideEffectBlockWithException(toWrite: Throwable, @Nullable retryPolicy: @Nullable RetryPolicy, callback: ExitSideEffectSyscallCallback)
Link copied to clipboard
abstract fun fail(cause: Throwable)
Link copied to clipboard
abstract fun get(name: String, callback: SyscallCallback<Deferred<ByteBuffer>>)
Link copied to clipboard
abstract fun getKeys(callback: SyscallCallback<Deferred<Collection<String>>>)
Link copied to clipboard
abstract fun isInsideSideEffect(): Boolean
Link copied to clipboard
abstract fun objectKey(): String
Link copied to clipboard
abstract fun peekPromise(key: String, callback: SyscallCallback<Deferred<ByteBuffer>>)
Link copied to clipboard
abstract fun promise(key: String, callback: SyscallCallback<Deferred<ByteBuffer>>)
Link copied to clipboard
abstract fun rejectAwakeable(id: String, reason: String, requestCallback: SyscallCallback<Void>)
Link copied to clipboard
abstract fun rejectPromise(key: String, reason: String, callback: SyscallCallback<Deferred<Void>>)
Link copied to clipboard
abstract fun request(): Request
Link copied to clipboard
abstract fun resolveAwakeable(id: String, payload: ByteBuffer, requestCallback: SyscallCallback<Void>)
Link copied to clipboard
abstract fun <T> resolveDeferred(deferredToResolve: Deferred<T>, callback: SyscallCallback<Void>)
Link copied to clipboard
abstract fun resolvePromise(key: String, payload: ByteBuffer, callback: SyscallCallback<Deferred<Void>>)
Link copied to clipboard
abstract fun send(target: Target, parameter: ByteBuffer, @Nullable delay: @Nullable Duration, requestCallback: SyscallCallback<Void>)
Link copied to clipboard
abstract fun set(name: String, value: ByteBuffer, callback: SyscallCallback<Void>)
Link copied to clipboard
abstract fun sleep(duration: Duration, callback: SyscallCallback<Deferred<Void>>)
Link copied to clipboard
abstract fun writeOutput(exception: TerminalException, callback: SyscallCallback<Void>)
abstract fun writeOutput(value: ByteBuffer, callback: SyscallCallback<Void>)