-
Notifications
You must be signed in to change notification settings - Fork 2k
/
TransactionalStateOptions.cs
32 lines (24 loc) · 1.43 KB
/
TransactionalStateOptions.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using System;
namespace Orleans.Configuration
{
public class TransactionalStateOptions
{
// max time a group can occupy the lock
public TimeSpan LockTimeout { get; set; } = DefaultLockTimeout;
public static TimeSpan DefaultLockTimeout = TimeSpan.FromSeconds(8);
// max time the TM will wait for prepare phase to complete
public TimeSpan PrepareTimeout { get; set; } = DefaultPrepareTimeout;
public static TimeSpan DefaultPrepareTimeout => TimeSpan.FromSeconds(20);
// max time a transaction will wait for the lock to become available
public TimeSpan LockAcquireTimeout { get; set; } = DefaultLockAcquireTimeout;
public static TimeSpan DefaultLockAcquireTimeout => TimeSpan.FromSeconds(10);
public TimeSpan RemoteTransactionPingFrequency { get; set; } = DefaultRemoteTransactionPingFrequency;
public static TimeSpan DefaultRemoteTransactionPingFrequency = TimeSpan.FromSeconds(60);
public TimeSpan ConfirmationRetryDelay { get; set; } = DefaultConfirmationRetryDelay;
private static TimeSpan DefaultConfirmationRetryDelay = TimeSpan.FromSeconds(30);
public static int ConfirmationRetryLimit { get; set; } = DefaultConfirmationRetryLimit;
public const int DefaultConfirmationRetryLimit = 3;
public int MaxLockGroupSize { get; set; } = DefaultMaxLockGroupSize;
public const int DefaultMaxLockGroupSize = 20;
}
}