Class StdConverterBackwardsCompatAdapter
DefaultDataConverter.STANDARD_INSTANCE
Unfortunately, bad code hygiene and overload of the word "default" with several meanings in DefaultDataConverter led to a situation where a user-defined converter may be used to serialize these internal fields instead. This problem is solved now and all SDK internal fields are serialized using Standard data converter. But users may already have workflows created by older SDKs and overridden "default" (in meaning "global") converter containing payloads in internal fields that must be deserialized using the user-defined converter.
This class provides a compatibility layer for deserialization of such internal fields by first
using DefaultDataConverter.STANDARD_INSTANCE and falling back to GlobalDataConverter.get() in case of an exception.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TfromPayload(io.temporal.api.common.v1.Payload payload, Class<T> valueClass, Type valueType) static <T> TfromPayloads(int index, Optional<io.temporal.api.common.v1.Payloads> content, Class<T> valueType, Type valueGenericType)
-
Constructor Details
-
StdConverterBackwardsCompatAdapter
public StdConverterBackwardsCompatAdapter()
-
-
Method Details
-
fromPayload
-
fromPayloads
public static <T> T fromPayloads(int index, Optional<io.temporal.api.common.v1.Payloads> content, Class<T> valueType, Type valueGenericType) throws DataConverterException - Throws:
DataConverterException
-