Package dev.restate.sdk
package dev.restate.sdk
-
ClassDescriptionAwakeable<T>An
Awakeableis a special type ofDurableFuturewhich can be arbitrarily completed by another service, by addressing it with itsAwakeable.id().This class represents a handle to anAwakeablecreated in another service.DurableFuturereturned by a call to another service.This interface exposes the Restate functionalities to Restate services.ADurableFutureallows to await an asynchronous result.ADurablePromiseis a durable, distributed version of aCompletableFuture.This class represents a handle to anDurablePromisecreated in another handler.HandlerRunner<REQ,RES> Adapter class forHandlerRunnerto use the Java API.HandlerRunneroptions.InvocationHandle<Res>Handle to interact with an invocation.Deprecated, for removal: This API element is subject to removal in a future version.This interface can be used only within exclusive handlers of virtual objects.Preview of new context features.Subclass ofRandominherently predictable, seeded on theInvocationId, which is not secret.Select<T>Select lets you await concurrently for multipleDurableFutures to complete, and for the first one to complete, either return its value directly or map it.This interface can be used only within shared handlers of virtual objects.This interface can be used only within shared handlers of workflow.This interface can be used only within workflow handlers of workflow.
Context/StateKey/DurablePromiseKeymethods acceptingClass, for examplectx.run(String.class, myClosure)orctx.awakeable(Integer.TYPE)orStateKey.of("key", String.class)