Class RestateComponentProperties
These properties can be used to configure Restate services via Spring configuration files.
-
Constructor Summary
ConstructorsConstructorDescriptionRestateComponentProperties(@Nullable String executor, @Nullable String documentation, @Nullable Map<String, String> metadata, @Nullable Duration inactivityTimeout, @Nullable Duration abortTimeout, @Nullable Duration idempotencyRetention, @Nullable Duration workflowRetention, @Nullable Duration journalRetention, @Nullable Boolean ingressPrivate, @Nullable Boolean enableLazyState, @Nullable RetryPolicyProperties retryPolicy, @Nullable Map<String, RestateHandlerProperties> handlers) -
Method Summary
Modifier and TypeMethodDescriptionboolean@Nullable DurationThis timer guards against stalled service/handler invocations that are supposed to terminate.@Nullable StringDocumentation as shown in the UI, Admin REST API, and the generated OpenAPI documentation of this service.@Nullable BooleanWhen set totrue, lazy state will be enabled for all invocations to this service.@Nullable StringName of theExecutorbean to use for running handlers of this service.@Nullable Map<String, RestateHandlerProperties> Per-handler configuration, keyed by handler name.@Nullable DurationThe retention duration of idempotent requests to this service.@Nullable DurationThis timer guards against stalled invocations.@Nullable BooleanWhen set totruethis service, with all its handlers, cannot be invoked from the restate-server HTTP and Kafka ingress, but only from other services.@Nullable DurationThe journal retention.Service metadata, as propagated in the Admin REST API.@Nullable RetryPolicyPropertiesRetry policy used by Restate when invoking this service.@Nullable DurationThe retention duration of idempotent requests to this workflow service.inthashCode()voidsetAbortTimeout(@Nullable Duration abortTimeout) This timer guards against stalled service/handler invocations that are supposed to terminate.voidsetDocumentation(@Nullable String documentation) Documentation as shown in the UI, Admin REST API, and the generated OpenAPI documentation of this service.voidsetEnableLazyState(@Nullable Boolean enableLazyState) When set totrue, lazy state will be enabled for all invocations to this service.voidsetExecutor(@Nullable String executor) Name of theExecutorbean to use for running handlers of this service.voidsetHandlers(@Nullable Map<String, RestateHandlerProperties> handlers) Per-handler configuration, keyed by handler name.voidsetIdempotencyRetention(@Nullable Duration idempotencyRetention) The retention duration of idempotent requests to this service.voidsetInactivityTimeout(@Nullable Duration inactivityTimeout) This timer guards against stalled invocations.voidsetIngressPrivate(@Nullable Boolean ingressPrivate) When set totruethis service, with all its handlers, cannot be invoked from the restate-server HTTP and Kafka ingress, but only from other services.voidsetJournalRetention(@Nullable Duration journalRetention) The journal retention.voidsetMetadata(@Nullable Map<String, String> metadata) Service metadata, as propagated in the Admin REST API.voidsetRetryPolicy(@Nullable RetryPolicyProperties retryPolicy) Retry policy used by Restate when invoking this service.voidsetWorkflowRetention(@Nullable Duration workflowRetention) The retention duration of idempotent requests to this workflow service.toString()
-
Constructor Details
-
RestateComponentProperties
public RestateComponentProperties() -
RestateComponentProperties
public RestateComponentProperties(@Nullable String executor, @Nullable String documentation, @Nullable Map<String, String> metadata, @Nullable Duration inactivityTimeout, @Nullable Duration abortTimeout, @Nullable Duration idempotencyRetention, @Nullable Duration workflowRetention, @Nullable Duration journalRetention, @Nullable Boolean ingressPrivate, @Nullable Boolean enableLazyState, @Nullable RetryPolicyProperties retryPolicy, @Nullable Map<String, RestateHandlerProperties> handlers)
-
-
Method Details
-
getExecutor
Name of theExecutorbean to use for running handlers of this service. If not specified, the global default fromRestateComponentsPropertiesis used.NOTE: This option is only used for Java services, not Kotlin services.
If not specified (neither here nor globally), virtual threads are used for Java >= 21, otherwise
Executors.newCachedThreadPool()is used. SeeHandlerRunner.Options.withExecutor()for more details. -
setExecutor
Name of theExecutorbean to use for running handlers of this service. If not specified, the global default fromRestateComponentsPropertiesis used.NOTE: This option is only used for Java services, not Kotlin services.
If not specified (neither here nor globally), virtual threads are used for Java >= 21, otherwise
Executors.newCachedThreadPool()is used. SeeHandlerRunner.Options.withExecutor()for more details. -
getDocumentation
Documentation as shown in the UI, Admin REST API, and the generated OpenAPI documentation of this service. -
setDocumentation
Documentation as shown in the UI, Admin REST API, and the generated OpenAPI documentation of this service. -
getMetadata
Service metadata, as propagated in the Admin REST API. -
setMetadata
Service metadata, as propagated in the Admin REST API. -
getInactivityTimeout
This timer guards against stalled invocations. Once it expires, Restate triggers a graceful termination by asking the invocation to suspend (which preserves intermediate progress).The
getAbortTimeout()is used to abort the invocation, in case it doesn't react to the request to suspend.This overrides the default inactivity timeout configured in the restate-server for all invocations to this service.
NOTE: You can set this field only if you register this service against restate-server >= 1.4, otherwise the service discovery will fail.
-
setInactivityTimeout
This timer guards against stalled invocations. Once it expires, Restate triggers a graceful termination by asking the invocation to suspend (which preserves intermediate progress).The
getAbortTimeout()is used to abort the invocation, in case it doesn't react to the request to suspend.This overrides the default inactivity timeout configured in the restate-server for all invocations to this service.
NOTE: You can set this field only if you register this service against restate-server >= 1.4, otherwise the service discovery will fail.
-
getAbortTimeout
This timer guards against stalled service/handler invocations that are supposed to terminate. The abort timeout is started after thegetInactivityTimeout()has expired and the service/handler invocation has been asked to gracefully terminate. Once the timer expires, it will abort the service/handler invocation.This timer potentially interrupts user code. If the user code needs longer to gracefully terminate, then this value needs to be set accordingly.
This overrides the default abort timeout configured in the restate-server for all invocations to this service.
NOTE: You can set this field only if you register this service against restate-server >= 1.4, otherwise the service discovery will fail.
-
setAbortTimeout
This timer guards against stalled service/handler invocations that are supposed to terminate. The abort timeout is started after thegetInactivityTimeout()has expired and the service/handler invocation has been asked to gracefully terminate. Once the timer expires, it will abort the service/handler invocation.This timer potentially interrupts user code. If the user code needs longer to gracefully terminate, then this value needs to be set accordingly.
This overrides the default abort timeout configured in the restate-server for all invocations to this service.
NOTE: You can set this field only if you register this service against restate-server >= 1.4, otherwise the service discovery will fail.
-
getIdempotencyRetention
The retention duration of idempotent requests to this service.NOTE: You can set this field only if you register this service against restate-server >= 1.4, otherwise the service discovery will fail.
-
setIdempotencyRetention
The retention duration of idempotent requests to this service.NOTE: You can set this field only if you register this service against restate-server >= 1.4, otherwise the service discovery will fail.
-
getWorkflowRetention
The retention duration of idempotent requests to this workflow service. This applies only to workflow services.NOTE: You can set this field only if you register this service against restate-server >= 1.4, otherwise the service discovery will fail.
-
setWorkflowRetention
The retention duration of idempotent requests to this workflow service. This applies only to workflow services.NOTE: You can set this field only if you register this service against restate-server >= 1.4, otherwise the service discovery will fail.
-
getJournalRetention
The journal retention. When set, this applies to all requests to all handlers of this service.In case the request has an idempotency key, the
getIdempotencyRetention()caps the journal retention time.NOTE: You can set this field only if you register this service against restate-server >= 1.4, otherwise the service discovery will fail.
-
setJournalRetention
The journal retention. When set, this applies to all requests to all handlers of this service.In case the request has an idempotency key, the
getIdempotencyRetention()caps the journal retention time.NOTE: You can set this field only if you register this service against restate-server >= 1.4, otherwise the service discovery will fail.
-
getIngressPrivate
When set totruethis service, with all its handlers, cannot be invoked from the restate-server HTTP and Kafka ingress, but only from other services.NOTE: You can set this field only if you register this service against restate-server >= 1.4, otherwise the service discovery will fail.
-
setIngressPrivate
When set totruethis service, with all its handlers, cannot be invoked from the restate-server HTTP and Kafka ingress, but only from other services.NOTE: You can set this field only if you register this service against restate-server >= 1.4, otherwise the service discovery will fail.
-
getEnableLazyState
When set totrue, lazy state will be enabled for all invocations to this service. This is relevant only for workflows and virtual objects.NOTE: You can set this field only if you register this service against restate-server >= 1.4, otherwise the service discovery will fail.
-
setEnableLazyState
When set totrue, lazy state will be enabled for all invocations to this service. This is relevant only for workflows and virtual objects.NOTE: You can set this field only if you register this service against restate-server >= 1.4, otherwise the service discovery will fail.
-
getRetryPolicy
Retry policy used by Restate when invoking this service.NOTE: You can set this field only if you register this service against restate-server >= 1.5, otherwise the service discovery will fail.
-
setRetryPolicy
Retry policy used by Restate when invoking this service.NOTE: You can set this field only if you register this service against restate-server >= 1.5, otherwise the service discovery will fail.
-
getHandlers
Per-handler configuration, keyed by handler name. -
setHandlers
Per-handler configuration, keyed by handler name. -
equals
-
hashCode
public int hashCode() -
toString
-