Class TxnRequest
From google paxosdb paper:
Our implementation hinges around a powerful primitive which we call MultiOp. All other database
operations except for iteration are implemented as a single call to MultiOp. A MultiOp is applied atomically
and consists of three components:
- A list of tests called guard. Each test in guard checks a single entry in the database. It may check
for the absence or presence of a value, or compare with a given value. Two different tests in the guard
may apply to the same or different entries in the database. All tests in the guard are applied and
MultiOp returns the results. If all tests are true, MultiOp executes t op (see item 2 below), otherwise
it executes f op (see item 3 below).
- A list of database operations called t op. Each operation in the list is either an insert, delete, or
lookup operation, and applies to a single database entry. Two different operations in the list may apply
to the same or different entries in the database. These operations are executed
if guard evaluates to
true.
- A list of database operations called f op. Like t op, but executed if guard evaluates to false.
Inheritance
System.Object
TxnRequest
Assembly: cs.temp.dll.dll
Syntax
public sealed class TxnRequest : Google.Protobuf.IMessage<TxnRequest>
Constructors
TxnRequest()
Declaration
TxnRequest(TxnRequest)
Declaration
public TxnRequest(TxnRequest other)
Parameters
Fields
CompareFieldNumber
Field number for the "compare" field.
Declaration
public const int CompareFieldNumber = 1
Field Value
Type |
Description |
System.Int32 |
|
FailureFieldNumber
Field number for the "failure" field.
Declaration
public const int FailureFieldNumber = 3
Field Value
Type |
Description |
System.Int32 |
|
SuccessFieldNumber
Field number for the "success" field.
Declaration
public const int SuccessFieldNumber = 2
Field Value
Type |
Description |
System.Int32 |
|
Properties
Compare
compare is a list of predicates representing a conjunction of terms.
If the comparisons succeed, then the success requests will be processed in order,
and the response will contain their respective responses in order.
If the comparisons fail, then the failure requests will be processed in order,
and the response will contain their respective responses in order.
Declaration
public Google.Protobuf.Collections.RepeatedField<Compare> Compare { get; }
Property Value
Type |
Description |
Google.Protobuf.Collections.RepeatedField<Compare> |
|
Descriptor
Declaration
public static Google.Protobuf.Reflection.MessageDescriptor Descriptor { get; }
Property Value
Type |
Description |
Google.Protobuf.Reflection.MessageDescriptor |
|
Failure
failure is a list of requests which will be applied when compare evaluates to false.
Declaration
public Google.Protobuf.Collections.RepeatedField<RequestOp> Failure { get; }
Property Value
Type |
Description |
Google.Protobuf.Collections.RepeatedField<RequestOp> |
|
Parser
Declaration
public static Google.Protobuf.MessageParser<TxnRequest> Parser { get; }
Property Value
Type |
Description |
Google.Protobuf.MessageParser<TxnRequest> |
|
Success
success is a list of requests which will be applied when compare evaluates to true.
Declaration
public Google.Protobuf.Collections.RepeatedField<RequestOp> Success { get; }
Property Value
Type |
Description |
Google.Protobuf.Collections.RepeatedField<RequestOp> |
|
Methods
CalculateSize()
Declaration
public int CalculateSize()
Returns
Type |
Description |
System.Int32 |
|
Clone()
Declaration
public TxnRequest Clone()
Returns
Equals(TxnRequest)
Declaration
public bool Equals(TxnRequest other)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Equals(Object)
Declaration
public override bool Equals(object other)
Parameters
Type |
Name |
Description |
System.Object |
other |
|
Returns
Type |
Description |
System.Boolean |
|
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
|
MergeFrom(TxnRequest)
Declaration
public void MergeFrom(TxnRequest other)
Parameters
Declaration
public void MergeFrom(Google.Protobuf.CodedInputStream input)
Parameters
Type |
Name |
Description |
Google.Protobuf.CodedInputStream |
input |
|
ToString()
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
WriteTo(Google.Protobuf.CodedOutputStream)
Declaration
public void WriteTo(Google.Protobuf.CodedOutputStream output)
Parameters
Type |
Name |
Description |
Google.Protobuf.CodedOutputStream |
output |
|