Interface Copyable<T extends Copyable<T>>
- Type Parameters:
T- the type of the copied value.
Copies must not share mutable reachable state with the original. Deeply immutable values may
return this. A copy must be non-null and compatible with the original's runtime type.
Copying must be side-effect-free, safe for concurrent calls, and deterministically equivalent to a round trip through the configured data converter. The SDK may call it on workflow or activity threads, including during replay. Object identity must not affect workflow behavior.
Currently, only local activities use this interface. Input batches use scheduling-time snapshots when every non-null argument is copyable. Compatible requested types use fresh copies; other types use the data converter. Copying is independent of marker options; omitted inputs avoid serialization unless conversion or explicit payload access requires it. Outputs remain serialized for history and deserialized on replay. Other execution paths, including eager workflows and eager activities, do not yet use this interface.
-
Method Summary
-
Method Details
-
copy
T copy()Returns an independent copy satisfying this interface's contract.- Returns:
- a non-null copy, or
thisfor a deeply immutable value.
-