Table of Contents

Struct DatabaseLockFile.LockInfo

Namespace
Typhon.Engine
Assembly
Typhon.Engine.dll

Who holds a database, and whether they are willing to step aside.

public readonly struct DatabaseLockFile.LockInfo : IEquatable<DatabaseLockFile.LockInfo>
Implements
Inherited Members

Constructors

LockInfo(int, string, DateTimeOffset, bool)

Who holds a database, and whether they are willing to step aside.

public LockInfo(int Pid, string MachineName, DateTimeOffset StartedAt, bool Yieldable)

Parameters

Pid int

Process id of the holder.

MachineName string

Machine the holder runs on. A different machine cannot be probed for liveness.

StartedAt DateTimeOffset

When the holder acquired the database.

Yieldable bool

true only when the holder explicitly advertised it. Absent means false, so a lock written by an older build — or by any normal engine — is never mistaken for one that will release on request.

Properties

MachineName

Machine the holder runs on. A different machine cannot be probed for liveness.

public string MachineName { get; init; }

Property Value

string

Pid

Process id of the holder.

public int Pid { get; init; }

Property Value

int

StartedAt

When the holder acquired the database.

public DateTimeOffset StartedAt { get; init; }

Property Value

DateTimeOffset

Yieldable

true only when the holder explicitly advertised it. Absent means false, so a lock written by an older build — or by any normal engine — is never mistaken for one that will release on request.

public bool Yieldable { get; init; }

Property Value

bool

Methods

Deconstruct(out int, out string, out DateTimeOffset, out bool)

public void Deconstruct(out int Pid, out string MachineName, out DateTimeOffset StartedAt, out bool Yieldable)

Parameters

Pid int
MachineName string
StartedAt DateTimeOffset
Yieldable bool

Equals(object)

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

Equals(LockInfo)

public bool Equals(DatabaseLockFile.LockInfo other)

Parameters

other DatabaseLockFile.LockInfo

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

Operators

operator ==(LockInfo, LockInfo)

public static bool operator ==(DatabaseLockFile.LockInfo left, DatabaseLockFile.LockInfo right)

Parameters

left DatabaseLockFile.LockInfo
right DatabaseLockFile.LockInfo

Returns

bool

operator !=(LockInfo, LockInfo)

public static bool operator !=(DatabaseLockFile.LockInfo left, DatabaseLockFile.LockInfo right)

Parameters

left DatabaseLockFile.LockInfo
right DatabaseLockFile.LockInfo

Returns

bool