Package dev.restate.sdk
Class PreviewContext
- java.lang.Object
-
- dev.restate.sdk.PreviewContext
-
public class PreviewContext extends java.lang.ObjectPreview of new context features. Please note that the methods in this class may break between minor releases, use with caution!In order to use these methods, you MUST enable the preview context, through the endpoint builders using
enablePreviewContext().
-
-
Constructor Summary
Constructors Constructor Description PreviewContext()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidrun(Context ctx, dev.restate.sdk.common.RetryPolicy retryPolicy, dev.restate.sdk.common.function.ThrowingRunnable runnable)LikeContext.run(ThrowingRunnable), but using a custom retry policy.static <T> Trun(Context ctx, dev.restate.sdk.common.Serde<T> serde, dev.restate.sdk.common.RetryPolicy retryPolicy, dev.restate.sdk.common.function.ThrowingSupplier<T> action)LikeContext.run(Serde, ThrowingSupplier), but using a custom retry policy.static voidrun(Context ctx, java.lang.String name, dev.restate.sdk.common.RetryPolicy retryPolicy, dev.restate.sdk.common.function.ThrowingRunnable runnable)LikeContext.run(String, ThrowingRunnable), but using a custom retry policy.static <T> Trun(Context ctx, java.lang.String name, dev.restate.sdk.common.Serde<T> serde, dev.restate.sdk.common.RetryPolicy retryPolicy, dev.restate.sdk.common.function.ThrowingSupplier<T> action)LikeContext.run(String, Serde, ThrowingSupplier), but using a custom retry policy.
-
-
-
Method Detail
-
run
public static <T> T run(Context ctx, java.lang.String name, dev.restate.sdk.common.Serde<T> serde, dev.restate.sdk.common.RetryPolicy retryPolicy, dev.restate.sdk.common.function.ThrowingSupplier<T> action) throws dev.restate.sdk.common.TerminalException
LikeContext.run(String, Serde, ThrowingSupplier), but using a custom retry policy.When a retry policy is not specified, the
runwill be retried using the Restate invoker retry policy, which by default retries indefinitely.- Throws:
dev.restate.sdk.common.TerminalException
-
run
public static void run(Context ctx, java.lang.String name, dev.restate.sdk.common.RetryPolicy retryPolicy, dev.restate.sdk.common.function.ThrowingRunnable runnable) throws dev.restate.sdk.common.TerminalException
LikeContext.run(String, ThrowingRunnable), but using a custom retry policy.When a retry policy is not specified, the
runwill be retried using the Restate invoker retry policy, which by default retries indefinitely.- Throws:
dev.restate.sdk.common.TerminalException
-
run
public static <T> T run(Context ctx, dev.restate.sdk.common.Serde<T> serde, dev.restate.sdk.common.RetryPolicy retryPolicy, dev.restate.sdk.common.function.ThrowingSupplier<T> action) throws dev.restate.sdk.common.TerminalException
LikeContext.run(Serde, ThrowingSupplier), but using a custom retry policy.When a retry policy is not specified, the
runwill be retried using the Restate invoker retry policy, which by default retries indefinitely.- Throws:
dev.restate.sdk.common.TerminalException
-
run
public static void run(Context ctx, dev.restate.sdk.common.RetryPolicy retryPolicy, dev.restate.sdk.common.function.ThrowingRunnable runnable) throws dev.restate.sdk.common.TerminalException
LikeContext.run(ThrowingRunnable), but using a custom retry policy.When a retry policy is not specified, the
runwill be retried using the Restate invoker retry policy, which by default retries indefinitely.- Throws:
dev.restate.sdk.common.TerminalException
-
-