Class LockTransactionResult
Represents a result of locking operation performed by ILockManager.
If transaction selects some results then this class enumerates all key value pairs that may contain duplicate names
Inheritance
System.Object
LockTransactionResult
Implements
System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String, System.Object>>
System.Collections.IEnumerable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Assembly: Azos.Sky.dll
Syntax
[Serializable]
public sealed class LockTransactionResult : IEnumerable<KeyValuePair<string, object>>, IEnumerable
Constructors
LockTransactionResult(Guid, String, LockStatus, LockErrorCause, String, UInt32, Double, KeyValuePair<String, Object>[])
Declaration
public LockTransactionResult(Guid tranID, string server, LockStatus status, LockErrorCause errorCause, string failedStatement, uint runtimeSec, double trustLevel, KeyValuePair<string, object>[] data)
Parameters
| Type |
Name |
Description |
| System.Guid |
tranID |
|
| System.String |
server |
|
| LockStatus |
status |
|
| LockErrorCause |
errorCause |
|
| System.String |
failedStatement |
|
| System.UInt32 |
runtimeSec |
|
| System.Double |
trustLevel |
|
| System.Collections.Generic.KeyValuePair<System.String, System.Object>[] |
data |
|
Fields
ErrorCause
In case of error specifies the cause
Declaration
public readonly LockErrorCause ErrorCause
Field Value
FailedStatement
Returns the description of failed statement or null if transactions succeeded
Declaration
public readonly string FailedStatement
Field Value
| Type |
Description |
| System.String |
|
ServerHost
Returns the host name of the host that serviced the call
Declaration
public readonly string ServerHost
Field Value
| Type |
Description |
| System.String |
|
ServerRuntimeSec
Returns for how many seconds the server has been running
Declaration
public readonly uint ServerRuntimeSec
Field Value
| Type |
Description |
| System.UInt32 |
|
ServerTrustLevel
Returns the coefficient of trust 0..1(maximum) of the server state.
The value is computed based on the length of server uninterrupted runtime.
This value plays an important role in speculative locking when lock server crashes, the caller may examine
this returned value and based on it reject the fact that lock was taken, or the caller may specify
the LockTransaction.MinimumRequiredTrustLevel for the transaction to succeed
Declaration
public readonly double ServerTrustLevel
Field Value
| Type |
Description |
| System.Double |
|
Status
Returns the status of the call: whether call failed or transaction could not be executed
Declaration
public readonly LockStatus Status
Field Value
TransactionID
Returns the original transaction ID
Declaration
public readonly Guid TransactionID
Field Value
| Type |
Description |
| System.Guid |
|
Properties
CallFailed
Declaration
public static LockTransactionResult CallFailed { get; }
Property Value
Count
Returns the count of returned variables
Declaration
public int Count { get; }
Property Value
| Type |
Description |
| System.Int32 |
|
Item[String]
Returns the first variable value by case-sensitive name. The var names may not be unique,
as they are added during tran execution. Use instance of this class to enumerate all key value pairs
Declaration
public object this[string var] { get; }
Parameters
| Type |
Name |
Description |
| System.String |
var |
|
Property Value
| Type |
Description |
| System.Object |
|
Methods
GetEnumerator()
Declaration
public IEnumerator<KeyValuePair<string, object>> GetEnumerator()
Returns
| Type |
Description |
| System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<System.String, System.Object>> |
|
ToString()
Declaration
public override string ToString()
Returns
| Type |
Description |
| System.String |
|
Overrides
System.Object.ToString()
Explicit Interface Implementations
IEnumerable.GetEnumerator()
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
| Type |
Description |
| System.Collections.IEnumerator |
|
Implements
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable
Extension Methods