Table of Contents

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

original TableBasedDistributedLockSettings

TableBasedDistributedLockSettings(string)

Initializes a new instance of the TableBasedDistributedLockSettings class.

protected TableBasedDistributedLockSettings(string lockName)

Parameters

lockName string

The 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

TimeSpan

EqualityContract

protected override Type EqualityContract { get; }

Property Value

Type

HeartbeatInterval

Gets the interval between two heartbeat updates. The default is 500 milliseconds.

public TimeSpan HeartbeatInterval { get; init; }

Property Value

TimeSpan

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

TimeSpan

Methods

Equals(DistributedLockSettings?)

public override sealed bool Equals(DistributedLockSettings? other)

Parameters

other DistributedLockSettings

Returns

bool

Equals(TableBasedDistributedLockSettings?)

public virtual bool Equals(TableBasedDistributedLockSettings? other)

Parameters

other TableBasedDistributedLockSettings

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

PrintMembers(StringBuilder)

protected override bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

ToString()

public override string ToString()

Returns

string

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

left TableBasedDistributedLockSettings
right TableBasedDistributedLockSettings

Returns

bool

operator !=(TableBasedDistributedLockSettings?, TableBasedDistributedLockSettings?)

public static bool operator !=(TableBasedDistributedLockSettings? left, TableBasedDistributedLockSettings? right)

Parameters

left TableBasedDistributedLockSettings
right TableBasedDistributedLockSettings

Returns

bool