Class TimeSkippingConfig
- Namespace
- Temporalio.Api.Common.V1
- Assembly
- Temporalio.dll
The configuration for time skipping of an execution. When time skipping is enabled, virtual time advances automatically whenever there is no in-flight work. Options like fast_forward, disable_propagation, and max_session_skip_count are provided for granular control of the execution's time skipping behavior. See each field's comment for a detailed explanation.
An example of workflows with time skipping: For workflows, an execution is a chain of runs including retries, cron, and continue-as-new. In-flight work includes activities, child workflows, Nexus operations, signal/cancel external workflow operations, etc. User timers are not classified as in-flight work and will be skipped over; the virtual clock may also skip to the time point of the registered fast-forward when there is no in-flight work. Whenever time is skipped, the skip count is incremented by one; max_session_skip_count bounds the number of skips allowed within a single time-skipping session. For child workflows, by default, if the parent execution is skipping time, the child execution will also skip time, but a parent's fast_forward won't affect its child's execution. A flag is provided to disable propagation of the "enabled" flag to child workflows; regardless of that flag, a child workflow inherits the virtual time from the parent execution as its start time.
public sealed class TimeSkippingConfig : IMessage<TimeSkippingConfig>, IEquatable<TimeSkippingConfig>, IDeepCloneable<TimeSkippingConfig>, IBufferMessage, IMessage
- Inheritance
-
TimeSkippingConfig
- Implements
-
IMessage<TimeSkippingConfig>IDeepCloneable<TimeSkippingConfig>IBufferMessageIMessage
- Inherited Members
Constructors
TimeSkippingConfig()
public TimeSkippingConfig()
TimeSkippingConfig(TimeSkippingConfig)
public TimeSkippingConfig(TimeSkippingConfig other)
Parameters
otherTimeSkippingConfig
Fields
DisablePropagationFieldNumber
Field number for the "disable_propagation" field.
public const int DisablePropagationFieldNumber = 3
Field Value
EnabledFieldNumber
Field number for the "enabled" field.
public const int EnabledFieldNumber = 1
Field Value
FastForwardConfigFieldNumber
Field number for the "fast_forward_config" field.
public const int FastForwardConfigFieldNumber = 2
Field Value
MaxSessionSkipCountFieldNumber
Field number for the "max_session_skip_count" field.
public const int MaxSessionSkipCountFieldNumber = 4
Field Value
Properties
Descriptor
public static MessageDescriptor Descriptor { get; }
Property Value
- MessageDescriptor
DisablePropagation
By default, executions started by another execution (e.g. a child workflow of a parent workflow or a schedule with the time-skipping policy enabled) inherit the "enabled" flag and skip time when possible. This flag disables that inheritance.
public bool DisablePropagation { get; set; }
Property Value
Enabled
Enables or disables time skipping for this workflow execution.
public bool Enabled { get; set; }
Property Value
FastForwardConfig
An optional opt-in to control time-skipping behavior through fast-forward; see its definition for details.
public FastForwardConfig FastForwardConfig { get; set; }
Property Value
MaxSessionSkipCount
The maximum number of skips allowed every time this field is updated. It protects the execution from situations like unlimited retries when backoff is skipped.
Every time the execution skips time, the skip count is incremented by one, and when it reaches max_session_skip_count, time skipping stops. Whenever this config field is updated, the accumulated skip count is cleared, marking the start of a new session. For an execution with a chain of runs (retry, cron, continue-as-new), the count is accumulated across all runs within the same session.
If this field is not set, the server applies a large default value (e.g. 100). The default can be changed through dynamic config, and is overridden by this field when set.
public int MaxSessionSkipCount { get; set; }
Property Value
Parser
public static MessageParser<TimeSkippingConfig> Parser { get; }
Property Value
- MessageParser<TimeSkippingConfig>
Methods
CalculateSize()
Calculates the size of this message in Protocol Buffer wire format, in bytes.
public int CalculateSize()
Returns
- int
The number of bytes required to write this message to a coded output stream.
Clone()
Creates a deep clone of this object.
public TimeSkippingConfig Clone()
Returns
- TimeSkippingConfig
A deep clone of this object.
Equals(object)
Determines whether the specified object is equal to the current object.
public override bool Equals(object other)
Parameters
otherobject
Returns
Equals(TimeSkippingConfig)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(TimeSkippingConfig other)
Parameters
otherTimeSkippingConfigAn object to compare with this object.
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
MergeFrom(CodedInputStream)
Merges the data from the specified coded input stream with the current message.
public void MergeFrom(CodedInputStream input)
Parameters
inputCodedInputStream
Remarks
See the user guide for precise merge semantics.
MergeFrom(TimeSkippingConfig)
Merges the given message into this one.
public void MergeFrom(TimeSkippingConfig other)
Parameters
otherTimeSkippingConfig
Remarks
See the user guide for precise merge semantics.
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
WriteTo(CodedOutputStream)
Writes the data to the given coded output stream.
public void WriteTo(CodedOutputStream output)
Parameters
outputCodedOutputStreamCoded output stream to write the data to. Must not be null.