Class RestateHandlerProperties
These properties can be used to configure individual handlers within a Restate service via Spring configuration files.
-
Constructor Summary
ConstructorsConstructorDescriptionRestateHandlerProperties(@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) -
Method Summary
Modifier and TypeMethodDescriptionboolean@Nullable DurationThis timer guards against stalled invocations that are supposed to terminate.@Nullable StringDocumentation as shown in the UI, Admin REST API, and the generated OpenAPI documentation of this handler.@Nullable BooleanWhen set totrue, lazy state will be enabled for all invocations to this handler.@Nullable DurationThe retention duration of idempotent requests to this handler.@Nullable DurationThis timer guards against stalled invocations.@Nullable BooleanWhen set totruethis handler cannot be invoked from the restate-server HTTP and Kafka ingress, but only from other services.@Nullable DurationThe journal retention for invocations to this handler.Handler metadata, as propagated in the Admin REST API.@Nullable RetryPolicyPropertiesRetry policy used by Restate when invoking this handler.@Nullable DurationThe retention duration for workflow handlers.inthashCode()voidsetAbortTimeout(@Nullable Duration abortTimeout) This timer guards against stalled 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 handler.voidsetEnableLazyState(@Nullable Boolean enableLazyState) When set totrue, lazy state will be enabled for all invocations to this handler.voidsetIdempotencyRetention(@Nullable Duration idempotencyRetention) The retention duration of idempotent requests to this handler.voidsetInactivityTimeout(@Nullable Duration inactivityTimeout) This timer guards against stalled invocations.voidsetIngressPrivate(@Nullable Boolean ingressPrivate) When set totruethis handler cannot be invoked from the restate-server HTTP and Kafka ingress, but only from other services.voidsetJournalRetention(@Nullable Duration journalRetention) The journal retention for invocations to this handler.voidsetMetadata(@Nullable Map<String, String> metadata) Handler metadata, as propagated in the Admin REST API.voidsetRetryPolicy(@Nullable RetryPolicyProperties retryPolicy) Retry policy used by Restate when invoking this handler.voidsetWorkflowRetention(@Nullable Duration workflowRetention) The retention duration for workflow handlers.toString()
-
Constructor Details
-
RestateHandlerProperties
public RestateHandlerProperties() -
RestateHandlerProperties
public RestateHandlerProperties(@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)
-
-
Method Details
-
getDocumentation
Documentation as shown in the UI, Admin REST API, and the generated OpenAPI documentation of this handler. -
setDocumentation
Documentation as shown in the UI, Admin REST API, and the generated OpenAPI documentation of this handler. -
getMetadata
Handler metadata, as propagated in the Admin REST API. -
setMetadata
Handler 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 inactivity timeout set for the service and the default set in restate-server.
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 inactivity timeout set for the service and the default set in restate-server.
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 invocations that are supposed to terminate. The abort timeout is started after thegetInactivityTimeout()has expired and the invocation has been asked to gracefully terminate. Once the timer expires, it will abort the 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 abort timeout set for the service and the default set in restate-server.
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 invocations that are supposed to terminate. The abort timeout is started after thegetInactivityTimeout()has expired and the invocation has been asked to gracefully terminate. Once the timer expires, it will abort the 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 abort timeout set for the service and the default set in restate-server.
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 handler.NOTE: You can set this field only if you register this service against restate-server >= 1.4, otherwise the service discovery will fail.
NOTE: This cannot be set for workflow handlers. Use
getWorkflowRetention()instead. -
setIdempotencyRetention
The retention duration of idempotent requests to this handler.NOTE: You can set this field only if you register this service against restate-server >= 1.4, otherwise the service discovery will fail.
NOTE: This cannot be set for workflow handlers. Use
setWorkflowRetention(java.time.Duration)instead. -
getWorkflowRetention
The retention duration for workflow handlers.NOTE: You can set this field only if you register this service against restate-server >= 1.4, otherwise the service discovery will fail.
NOTE: This can only be set for workflow handlers.
-
setWorkflowRetention
The retention duration for workflow handlers.NOTE: You can set this field only if you register this service against restate-server >= 1.4, otherwise the service discovery will fail.
NOTE: This can only be set for workflow handlers.
-
getJournalRetention
The journal retention for invocations to this handler.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 for invocations to this handler.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 handler 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 handler 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 handler. 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 handler. 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 handler.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 handler.NOTE: You can set this field only if you register this service against restate-server >= 1.5, otherwise the service discovery will fail.
-
equals
-
hashCode
public int hashCode() -
toString
-