Class MarkerUtils

java.lang.Object
io.temporal.internal.history.MarkerUtils

public class MarkerUtils extends Object
  • Constructor Details

    • MarkerUtils

      public MarkerUtils()
  • Method Details

    • verifyMarkerName

      public static boolean verifyMarkerName(io.temporal.api.history.v1.HistoryEvent event, 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
    • verifyMarkerName

      public static boolean verifyMarkerName(io.temporal.api.command.v1.Command command, String markerName)
      Parameters:
      command - Command to inspect
      markerName - expected marker name
      Returns:
      true if the command 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, String key, 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