Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
ITransaction.cs
1using System;
2using System.Threading.Tasks;
3using Waher.Events;
4
6{
10 public interface ITransaction : IDisposable
11 {
15 Guid Id
16 {
17 get;
18 }
19
24 {
25 get;
26 }
27
31 object Tag
32 {
33 get;
34 set;
35 }
36
40 event EventHandlerAsync<TransactionEventArgs> StateChanged;
41
48 Task<bool> Prepare();
49
55 Task<bool> Execute();
56
62 Task<bool> Commit();
63
69 Task<bool> Rollback();
70
74 Task Abort();
75 }
76}
Interface for transactions
Definition: ITransaction.cs:11
Task< bool > Execute()
Executes the transaction.
Task< bool > Prepare()
Prepares the transaction for execution. This step can be used for validation and authorization of the...
Task< bool > Rollback()
Rolls back any changes made during the execution phase.
EventHandlerAsync< TransactionEventArgs > StateChanged
Event raised when the transaction state has changed.
Definition: ITransaction.cs:40
Task Abort()
Aborts the transaction.
TransactionState State
Transaction state.
Definition: ITransaction.cs:24
object Tag
Caller can use this property to tag the transaction with information.
Definition: ITransaction.cs:32
Task< bool > Commit()
Commits any changes made during the execution phase.
TransactionState
State of a transaction