bind
Add a Restate service to the endpoint. This will automatically discover the generated factory based on the class name.
If you want to modify some of the service definition options, such as documentation, inactivity timeout, and so on, use bind instead.
You can also manually instantiate the ServiceDefinition using bind.
Like bind, but allows to provide options for the handler runner. This allows to configure for the Java API the executor where to run the handler code, or the Kotlin API the coroutine context.
Look at the respective documentations of the HandlerRunner class in the Java or in the Kotlin module.
If you want to modify some of the service definition options, such as documentation, inactivity timeout, and so on, use bind instead.
See also
Same as bind but allows to configure the ServiceDefinition before binding it.
Endpoint endpoint = Endpoint
.builder()
.bind(
new Counter(),
// Configure the service
s -> s.journalRetention(Duration.ofDays(1))
)
.build();
See also
Same as bind but allows to configure the before binding it.
See also
Add a manual ServiceDefinition to the endpoint.