Table of Contents

Class PostgreSqlTableLockSettings

Namespace
Silverback.Lock
Assembly
Silverback.Storage.PostgreSql.dll

The PostgreSqlTableLock settings.

public record PostgreSqlTableLockSettings : TableBasedDistributedLockSettings, IValidatableSettings, IEquatable<DistributedLockSettings>, IEquatable<TableBasedDistributedLockSettings>, IDatabaseConnectionSettings, IEquatable<PostgreSqlTableLockSettings>
Inheritance
PostgreSqlTableLockSettings
Implements
Inherited Members

Constructors

PostgreSqlTableLockSettings(PostgreSqlTableLockSettings)

protected PostgreSqlTableLockSettings(PostgreSqlTableLockSettings original)

Parameters

original PostgreSqlTableLockSettings

PostgreSqlTableLockSettings(string, string)

Initializes a new instance of the PostgreSqlTableLockSettings class.

public PostgreSqlTableLockSettings(string lockName, string connectionString)

Parameters

lockName string

The name of the lock.

connectionString string

The connection string to the PostgreSql database.

Properties

ConnectionString

Gets the connection string to the PostgreSql database.

public string ConnectionString { get; }

Property Value

string

CreateTableTimeout

Gets the timeout for the table creation. The default is 30 seconds.

public TimeSpan CreateTableTimeout { get; init; }

Property Value

TimeSpan

DbCommandTimeout

Gets the database command timeout. The default is 10 seconds.

public TimeSpan DbCommandTimeout { get; init; }

Property Value

TimeSpan

EqualityContract

protected override Type EqualityContract { get; }

Property Value

Type

TableName

Gets the name of the locks table. The default is "SilverbackLocks".

public string TableName { get; init; }

Property Value

string

Methods

Equals(PostgreSqlTableLockSettings?)

public virtual bool Equals(PostgreSqlTableLockSettings? other)

Parameters

other PostgreSqlTableLockSettings

Returns

bool

Equals(TableBasedDistributedLockSettings?)

public override sealed 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 ==(PostgreSqlTableLockSettings?, PostgreSqlTableLockSettings?)

public static bool operator ==(PostgreSqlTableLockSettings? left, PostgreSqlTableLockSettings? right)

Parameters

left PostgreSqlTableLockSettings
right PostgreSqlTableLockSettings

Returns

bool

operator !=(PostgreSqlTableLockSettings?, PostgreSqlTableLockSettings?)

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

Parameters

left PostgreSqlTableLockSettings
right PostgreSqlTableLockSettings

Returns

bool