Package dev.restate.sdk.interceptor
Interface RunInterceptor
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Wraps the execution of a
Restate.run(java.lang.String, java.lang.Class<T>, dev.restate.common.function.ThrowingSupplier<T>) closure. Implementations must invoke RunInterceptor.Next.proceed() exactly once.
Only invoked when the run closure actually executes; replayed runs are skipped by the runner, so this interceptor is never called during replay.
Errors visible to the interceptor
The interceptor sees user code throwables and serialization failures unchanged. Whatever the outermost interceptor rethrows is what Restate's retry machinery sees.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordPer-ctx.runcall context exposed to aRunInterceptor.static interfaceFactory forRunInterceptor.static interfaceAdvances the interceptor chain. -
Method Summary
Modifier and TypeMethodDescriptionvoidaroundRun(RunInterceptor.Context context, RunInterceptor.Next next)
-
Method Details
-
aroundRun
- Throws:
Exception
-