Class HandlerRunner.Options

java.lang.Object
dev.restate.sdk.HandlerRunner.Options
All Implemented Interfaces:
HandlerRunner.Options
Enclosing class:
HandlerRunner<REQ,RES>

public static final class HandlerRunner.Options extends Object implements HandlerRunner.Options
HandlerRunner options, to configure the executor to use to run your services, and the interceptors.

By default, executor will be configured to use virtual threads on Java 21+, or fallback to Executors.newCachedThreadPool() for Java < 21. The bounded pool is shared among all HandlerRunner instances, and is used by Restate.run(java.lang.String, java.lang.Class<T>, dev.restate.common.function.ThrowingSupplier<T>)/Context.run(java.lang.String, java.lang.Class<T>, dev.restate.common.function.ThrowingSupplier<T>) as well.

HandlerInterceptor.Factory and RunInterceptor.Factory registered via SPI are also loaded by default.