Class OptionsUtils

java.lang.Object
io.temporal.internal.common.OptionsUtils

public final class OptionsUtils extends Object
  • Field Details

    • DEFAULT_TASK_START_TO_CLOSE_TIMEOUT

      public static final Duration DEFAULT_TASK_START_TO_CLOSE_TIMEOUT
    • SECOND

      public static final float SECOND
      See Also:
    • EMPTY_BLOB

      public static final byte[] EMPTY_BLOB
  • Method Details

    • toByteString

      public static com.google.protobuf.ByteString toByteString(byte[] value)
    • safeGet

      public static byte[] safeGet(byte[] value)
    • safeGet

      public static String safeGet(String value)
    • merge

      public static <G> G merge(G value, G overrideValueIfNotDefault, Class<G> type)
    • merge

      public static Duration merge(long aSeconds, Duration o)
      Merges value from annotation in seconds with option value as Duration. Option value takes precedence.
    • merge

      public static String[] merge(String[] fromAnnotation, String[] fromOptions)
    • roundUpToSeconds

      public static int roundUpToSeconds(Duration duration, Duration defaultValue)
      Convert milliseconds to seconds rounding up. Used by timers to ensure that they never fire earlier than requested.
    • roundUpToSeconds

      public static int roundUpToSeconds(Duration duration)
      Round durations to seconds rounding up. As all timeouts and timers resolution is in seconds ensures that nothing times out or fires before the requested time.