Struct DatabaseLockFile.LockInfo
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
PidintProcess id of the holder.
MachineNamestringMachine the holder runs on. A different machine cannot be probed for liveness.
StartedAtDateTimeOffsetWhen the holder acquired the database.
Yieldablebooltrueonly 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
Pid
Process id of the holder.
public int Pid { get; init; }
Property Value
StartedAt
When the holder acquired the database.
public DateTimeOffset StartedAt { get; init; }
Property Value
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
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
PidintMachineNamestringStartedAtDateTimeOffsetYieldablebool
Equals(object)
public override bool Equals(object obj)
Parameters
objobject
Returns
Equals(LockInfo)
public bool Equals(DatabaseLockFile.LockInfo other)
Parameters
otherDatabaseLockFile.LockInfo
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(LockInfo, LockInfo)
public static bool operator ==(DatabaseLockFile.LockInfo left, DatabaseLockFile.LockInfo right)
Parameters
leftDatabaseLockFile.LockInforightDatabaseLockFile.LockInfo
Returns
operator !=(LockInfo, LockInfo)
public static bool operator !=(DatabaseLockFile.LockInfo left, DatabaseLockFile.LockInfo right)
Parameters
leftDatabaseLockFile.LockInforightDatabaseLockFile.LockInfo