@@ -13,7 +13,6 @@ public class Options
1313 internal Action < FrameworkException > ? UnhandledExceptionHandler { get ; }
1414 internal TimeSpan ? RetentionPeriod { get ; }
1515 internal TimeSpan ? RetentionCleanUpFrequency { get ; }
16- internal TimeSpan ? LeaseLength { get ; }
1716 internal bool ? EnableWatchdogs { get ; }
1817 internal TimeSpan ? WatchdogCheckFrequency { get ; }
1918 internal TimeSpan ? DelayStartup { get ; }
@@ -22,14 +21,14 @@ public class Options
2221 internal TimeSpan ? MessagesDefaultMaxWaitForCompletion { get ; }
2322 internal ISerializer ? Serializer { get ; }
2423 internal UtcNow ? UtcNow { get ; }
24+ internal TimeSpan ? ReplicaHeartbeatFrequency { get ; }
2525
2626 /// <summary>
2727 /// Configuration options for Cleipnir
2828 /// </summary>
2929 /// <param name="unhandledExceptionHandler">Callback handler for unhandled flow exceptions</param>
3030 /// <param name="retentionPeriod">Period to keep completed flows before deletion. Default infinite.</param>
3131 /// <param name="retentionCleanUpFrequency">Retention clean-up check frequency. Default 1 hour when retention period is not infinite.</param>
32- /// <param name="leaseLength">Flow lease-length. Leases are automatically renewed. Default 60 seconds.</param>
3332 /// <param name="enableWatchdogs">Enable background crashed, interrupted and postponed flow scheduling. Default true.</param>
3433 /// <param name="watchdogCheckFrequency">Check frequency for eligible crashed, interrupted and postponed flows. Default 1 second.</param>
3534 /// <param name="messagesPullFrequency">Pull frequency for active/max-waiting messages. Default: 250ms</param>
@@ -38,24 +37,24 @@ public class Options
3837 /// <param name="maxParallelRetryInvocations">Limit the number of watchdog started invocations. Default: 100.</param>
3938 /// <param name="serializer">Specify custom serializer. Default built-in json-serializer.</param>
4039 /// <param name="utcNow">Provide custom delegate for providing current utc datetime. Default: () => DateTime.UtcNow</param>
40+ /// <param name="replicaHeartbeatFrequency">Heartbeat frequency for replica liveness detection. Default 1 second.</param>
4141 public Options (
4242 Action < FrameworkException > ? unhandledExceptionHandler = null ,
4343 TimeSpan ? retentionPeriod = null ,
4444 TimeSpan ? retentionCleanUpFrequency = null ,
45- TimeSpan ? leaseLength = null ,
4645 bool ? enableWatchdogs = null ,
4746 TimeSpan ? watchdogCheckFrequency = null ,
4847 TimeSpan ? messagesPullFrequency = null ,
4948 TimeSpan ? messagesDefaultMaxWaitForCompletion = null ,
5049 TimeSpan ? delayStartup = null ,
5150 int ? maxParallelRetryInvocations = null ,
5251 ISerializer ? serializer = null ,
53- UtcNow ? utcNow = null
52+ UtcNow ? utcNow = null ,
53+ TimeSpan ? replicaHeartbeatFrequency = null
5454 )
5555 {
5656 UnhandledExceptionHandler = unhandledExceptionHandler ;
5757 WatchdogCheckFrequency = watchdogCheckFrequency ;
58- LeaseLength = leaseLength ;
5958 RetentionPeriod = retentionPeriod ;
6059 RetentionCleanUpFrequency = retentionCleanUpFrequency ;
6160 EnableWatchdogs = enableWatchdogs ;
@@ -65,6 +64,7 @@ public Options(
6564 MaxParallelRetryInvocations = maxParallelRetryInvocations ;
6665 Serializer = serializer ;
6766 UtcNow = utcNow ;
67+ ReplicaHeartbeatFrequency = replicaHeartbeatFrequency ;
6868 }
6969
7070 public Options Merge ( Options options )
@@ -73,30 +73,31 @@ public Options Merge(Options options)
7373 UnhandledExceptionHandler ?? options . UnhandledExceptionHandler ,
7474 RetentionPeriod ?? options . RetentionPeriod ,
7575 RetentionCleanUpFrequency ?? options . RetentionCleanUpFrequency ,
76- LeaseLength ?? options . LeaseLength ,
7776 EnableWatchdogs ?? options . EnableWatchdogs ,
7877 WatchdogCheckFrequency ?? options . WatchdogCheckFrequency ,
7978 MessagesPullFrequency ?? options . MessagesPullFrequency ,
8079 MessagesDefaultMaxWaitForCompletion ?? options . MessagesDefaultMaxWaitForCompletion ,
8180 DelayStartup ?? options . DelayStartup ,
8281 MaxParallelRetryInvocations ?? options . MaxParallelRetryInvocations ,
83- Serializer ?? options . Serializer
82+ Serializer ?? options . Serializer ,
83+ UtcNow ?? options . UtcNow ,
84+ ReplicaHeartbeatFrequency ?? options . ReplicaHeartbeatFrequency
8485 ) ;
8586 }
8687
8788 internal Settings MapToSettings ( )
8889 => new (
89- UnhandledExceptionHandler ,
90- RetentionPeriod ,
91- RetentionCleanUpFrequency ,
92- LeaseLength ,
93- EnableWatchdogs ,
94- WatchdogCheckFrequency ,
95- MessagesPullFrequency ,
96- MessagesDefaultMaxWaitForCompletion ,
97- DelayStartup ,
98- MaxParallelRetryInvocations ,
99- Serializer ,
100- UtcNow
90+ unhandledExceptionHandler : UnhandledExceptionHandler ,
91+ retentionPeriod : RetentionPeriod ,
92+ retentionCleanUpFrequency : RetentionCleanUpFrequency ,
93+ enableWatchdogs : EnableWatchdogs ,
94+ watchdogCheckFrequency : WatchdogCheckFrequency ,
95+ messagesPullFrequency : MessagesPullFrequency ,
96+ messagesDefaultMaxWaitForCompletion : MessagesDefaultMaxWaitForCompletion ,
97+ delayStartup : DelayStartup ,
98+ maxParallelRetryInvocations : MaxParallelRetryInvocations ,
99+ serializer : Serializer ,
100+ utcNow : UtcNow ,
101+ replicaHeartbeatFrequency : ReplicaHeartbeatFrequency
101102 ) ;
102103}
0 commit comments