Class VersionMarkerUtils


  • public class VersionMarkerUtils
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static io.temporal.api.command.v1.RecordMarkerCommandAttributes createMarkerAttributes​(java.lang.String changeId, java.lang.Integer version)  
      static java.lang.String getChangeId​(io.temporal.api.history.v1.MarkerRecordedEventAttributes markerAttributes)  
      static java.lang.Integer getVersion​(io.temporal.api.history.v1.MarkerRecordedEventAttributes markerAttributes)  
      static boolean hasVersionMarkerStructure​(io.temporal.api.history.v1.HistoryEvent event)  
      static java.lang.String tryGetChangeIdFromVersionMarkerEvent​(io.temporal.api.history.v1.HistoryEvent event)  
      • Methods inherited from class java.lang.Object

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

      • MARKER_CHANGE_ID_KEY

        public static final java.lang.String MARKER_CHANGE_ID_KEY
        See Also:
        Constant Field Values
      • MARKER_VERSION_KEY

        public static final java.lang.String MARKER_VERSION_KEY
        See Also:
        Constant Field Values
    • Constructor Detail

      • VersionMarkerUtils

        public VersionMarkerUtils()
    • Method Detail

      • tryGetChangeIdFromVersionMarkerEvent

        @Nullable
        public static java.lang.String tryGetChangeIdFromVersionMarkerEvent​(io.temporal.api.history.v1.HistoryEvent event)
        Parameters:
        event - HistoryEvent to parse
        Returns:
        changeId of this version marker if the structure of this event looks like a marker event, null otherwise
      • hasVersionMarkerStructure

        public static boolean hasVersionMarkerStructure​(io.temporal.api.history.v1.HistoryEvent event)
        Parameters:
        event - HistoryEvent to inspect
        Returns:
        true if the event has a correct structure for a version marker
      • getChangeId

        @Nullable
        public static java.lang.String getChangeId​(io.temporal.api.history.v1.MarkerRecordedEventAttributes markerAttributes)
      • getVersion

        @Nullable
        public static java.lang.Integer getVersion​(io.temporal.api.history.v1.MarkerRecordedEventAttributes markerAttributes)
      • createMarkerAttributes

        public static io.temporal.api.command.v1.RecordMarkerCommandAttributes createMarkerAttributes​(java.lang.String changeId,
                                                                                                      java.lang.Integer version)