Class TableBasedDistributedLockSettings
- Namespace
- Silverback.Lock
- Assembly
- Silverback.Storage.Relational.dll
The DistributedLock settings.
public abstract record TableBasedDistributedLockSettings : DistributedLockSettings, IValidatableSettings, IEquatable<DistributedLockSettings>, IEquatable<TableBasedDistributedLockSettings>
- Inheritance
-
TableBasedDistributedLockSettings
- Implements
- Derived
- Inherited Members
Constructors
TableBasedDistributedLockSettings(TableBasedDistributedLockSettings)
protected TableBasedDistributedLockSettings(TableBasedDistributedLockSettings original)
Parameters
originalTableBasedDistributedLockSettings
TableBasedDistributedLockSettings(string)
Initializes a new instance of the TableBasedDistributedLockSettings class.
protected TableBasedDistributedLockSettings(string lockName)
Parameters
lockNamestringThe name of the lock.
Properties
AcquireInterval
Gets the interval between two attempts to acquire the lock. The default is 1 second.
public TimeSpan AcquireInterval { get; init; }
Property Value
EqualityContract
protected override Type EqualityContract { get; }
Property Value
HeartbeatInterval
Gets the interval between two heartbeat updates. The default is 500 milliseconds.
public TimeSpan HeartbeatInterval { get; init; }
Property Value
LockTimeout
Gets the maximum duration between two heartbeat updates, after which the lock is considered lost. The default is 5 seconds.
public TimeSpan LockTimeout { get; init; }
Property Value
Methods
Equals(DistributedLockSettings?)
public override sealed bool Equals(DistributedLockSettings? other)
Parameters
otherDistributedLockSettings
Returns
Equals(TableBasedDistributedLockSettings?)
public virtual bool Equals(TableBasedDistributedLockSettings? other)
Parameters
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
PrintMembers(StringBuilder)
protected override bool PrintMembers(StringBuilder builder)
Parameters
builderStringBuilder
Returns
ToString()
public override string ToString()
Returns
Validate()
Throws a SilverbackConfigurationException if the configuration is not valid.
public override void Validate()
Operators
operator ==(TableBasedDistributedLockSettings?, TableBasedDistributedLockSettings?)
public static bool operator ==(TableBasedDistributedLockSettings? left, TableBasedDistributedLockSettings? right)
Parameters
Returns
operator !=(TableBasedDistributedLockSettings?, TableBasedDistributedLockSettings?)
public static bool operator !=(TableBasedDistributedLockSettings? left, TableBasedDistributedLockSettings? right)