Interface Invocation
- All Superinterfaces:
InvocationMetadata
A single invocation to send through a
Producer / ExactlyOnceProducer.
Instances are created via create().
Passing null to a setter clears that field. Optional getters return null when
the corresponding field is not set.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Invocationcreate()Create a standalone invocation, not bound to any producer, to fill in and send.byte[]getBody()@Nullable String@Nullable Instant@Nullable String@Nullable StringAdd or replace a single header.setBody(byte @Nullable [] body) The invocation payload.setHandlerName(@Nullable String handlerName) Target handler name.setHeaders(@Nullable Map<String, String> headers) Replace the whole header map.setIdempotencyKey(@Nullable String idempotencyKey) Idempotency key used by Restate to deduplicate the invocation.setInvokeTime(@Nullable Instant invokeTime) Schedule the invocation at an absolute time.Target key (required when the target is a Virtual Object or Workflow).setLimitKey(@Nullable String limitKey) Rate/concurrency limit key.Scope.setServiceName(@Nullable String serviceName) Target service name.setTraceparent(@Nullable String traceparent) W3Ctraceparent.setTracestate(@Nullable String tracestate) W3Ctracestate.Methods inherited from interface InvocationMetadata
getHandlerName, getHeaders, getKey, getLimitKey, getScope, getServiceName
-
Method Details
-
create
Create a standalone invocation, not bound to any producer, to fill in and send. -
setBody
The invocation payload. -
getBody
byte[] getBody() -
setInvokeTime
Schedule the invocation at an absolute time. -
getInvokeTime
@Nullable Instant getInvokeTime() -
setTraceparent
W3Ctraceparent. -
getTraceparent
@Nullable String getTraceparent() -
setTracestate
W3Ctracestate. -
getTracestate
@Nullable String getTracestate() -
setIdempotencyKey
Idempotency key used by Restate to deduplicate the invocation. -
getIdempotencyKey
@Nullable String getIdempotencyKey() -
setServiceName
Description copied from interface:InvocationMetadataTarget service name.- Specified by:
setServiceNamein interfaceInvocationMetadata
-
setHandlerName
Description copied from interface:InvocationMetadataTarget handler name.- Specified by:
setHandlerNamein interfaceInvocationMetadata
-
setKey
Description copied from interface:InvocationMetadataTarget key (required when the target is a Virtual Object or Workflow).- Specified by:
setKeyin interfaceInvocationMetadata
-
setScope
Description copied from interface:InvocationMetadataScope.- Specified by:
setScopein interfaceInvocationMetadata
-
setLimitKey
Description copied from interface:InvocationMetadataRate/concurrency limit key.- Specified by:
setLimitKeyin interfaceInvocationMetadata
-
putHeader
Description copied from interface:InvocationMetadataAdd or replace a single header.- Specified by:
putHeaderin interfaceInvocationMetadata
-
setHeaders
Description copied from interface:InvocationMetadataReplace the whole header map.- Specified by:
setHeadersin interfaceInvocationMetadata
-