Class 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)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MarkerUtils

        public MarkerUtils()
    • Method Detail

      • verifyMarkerName

        public static boolean verifyMarkerName​(io.temporal.api.history.v1.HistoryEvent event,
                                               java.lang.String markerName)
        Parameters:
        event - HistoryEvent to inspect
        markerName - 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 frm
        key - key of the value in markerAttributes details map
        simpleValueType - class of a non-generic value to extract
        Returns:
        the value deserialized using standard data converter