Class LockOptions
Namespace: Consul
Assembly: Consul.dll
LockOptions is used to parameterize the Lock behavior.
public class LockOptions
Inheritance
Inherited Members
object.Equals(object) , object.Equals(object, object) , object.GetHashCode() , object.GetType() , object.MemberwiseClone() , object.ReferenceEquals(object, object) , object.ToString()
Constructors
LockOptions(string)
public LockOptions(string key)
Parameters
key
string
Properties
Key
public string Key { get; set; }
Property Value
LockRetryTime
public TimeSpan LockRetryTime { get; set; }
Property Value
LockTryOnce
When set to false,
When set to true,
SemaphoreSlim.Wait(Timespan timeout)
. Under the hood, it attempts to acquire the lock multiple times if needed (due to the HTTP Long Poll returning early), and will do so as many times as it can within the bounds set by LockWaitTime. If LockWaitTime is set to 0, there will be only single attempt to acquire the lock.public bool LockTryOnce { get; set; }
Property Value
LockWaitTime
public TimeSpan LockWaitTime { get; set; }
Property Value
MonitorRetries
public int MonitorRetries { get; set; }
Property Value
MonitorRetryTime
public TimeSpan MonitorRetryTime { get; set; }
Property Value
Session
public string Session { get; set; }
Property Value
SessionName
public string SessionName { get; set; }
Property Value
SessionTTL
public TimeSpan SessionTTL { get; set; }
Property Value
Value
public byte[] Value { get; set; }
Property Value
byte []