Class Target
java.lang.Object
dev.restate.common.Target
Represents an invocation target.
-
Method Summary
Modifier and TypeMethodDescriptionboolean@Nullable StringgetKey()@Nullable StringgetScope()PREVIEW: Scope of the request target.inthashCode()PREVIEW: Returns a newTargetrouted within the given scope.static Targetstatic TargetPREVIEW.toString()static TargetvirtualObject(String name, String key, String handler) static TargetvirtualObject(String scope, String name, String key, String handler) PREVIEW.static Targetstatic TargetPREVIEW.
-
Method Details
-
virtualObject
-
virtualObject
-
workflow
-
workflow
-
service
-
service
-
scoped
PREVIEW: Returns a newTargetrouted within the given scope.A scope is a sub-grouping of resources (invocations, virtual object instances, workflow instances, concurrency limits) within the Restate cluster. It becomes part of the target identity and contributes to the partition key, so all resources sharing a scope get co-located. The scope key must consist only of
[a-zA-Z0-9_.-]characters, with1 <= length <= 36.Requires Restate >= 1.7. See flow control.
- Parameters:
scope- the scope key to route this target within- Returns:
- a new
Targetwith the given scope
-
getScope
PREVIEW: Scope of the request target.- Returns:
- the scope. Null if no scope is set.
- See Also:
-
getService
-
getHandler
-
getKey
- Returns:
- the virtual object/workflow key. Null if the target is a regular service.
-
equals
-
hashCode
-
toString
-