Package io.temporal.internal.history
Class MarkerUtils
- java.lang.Object
-
- io.temporal.internal.history.MarkerUtils
-
public class MarkerUtils extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description MarkerUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> T
getValueFromMarker(io.temporal.api.history.v1.MarkerRecordedEventAttributes markerAttributes, java.lang.String key, java.lang.Class<T> simpleValueType)
This method should be used to extract values from the marker persisted by the SDK itself.static boolean
verifyMarkerName(io.temporal.api.history.v1.HistoryEvent event, java.lang.String markerName)
-
-
-
Method Detail
-
verifyMarkerName
public static boolean verifyMarkerName(io.temporal.api.history.v1.HistoryEvent event, java.lang.String markerName)
- Parameters:
event
-HistoryEvent
to inspectmarkerName
- expected marker name- Returns:
- true if the event has a correct structure for a marker and an expected marker name
-
getValueFromMarker
public static <T> T getValueFromMarker(io.temporal.api.history.v1.MarkerRecordedEventAttributes markerAttributes, java.lang.String key, java.lang.Class<T> simpleValueType)
This method should be used to extract values from the marker persisted by the SDK itself. These values are converted using standard data converter to be always accessible by the SDK.- Type Parameters:
T
- type of the value to extract- Parameters:
markerAttributes
- marker attributes to extract the value frmkey
- key of the value inmarkerAttributes
details mapsimpleValueType
- class of a non-generic value to extract- Returns:
- the value deserialized using standard data converter
-
-