Transaction Class |
Namespace: AGI.Foundation
The Transaction type exposes the following members.
Name | Description | |
---|---|---|
Transaction |
Begins a new transaction. Be sure to Dispose,
Commit, or Abort this transaction as soon as you
are done using it. Keeping transactions open for a long time will substantially
increase the memory usage and slow the performance of the software transactional
memory system. You should generally use
DoTransactionally(ActionTransaction)
instead of constructing a transaction directly.
|
Name | Description | |
---|---|---|
Context |
Gets the transaction context in which this transaction operates. This transaction can
only be used to access transacted objects in this context.
| |
IsActive | ||
Number |
Gets the number of this transaction. Multiple transactions may share a single number and
the number of a transaction may change when it is committed.
|
Name | Description | |
---|---|---|
Abort |
Aborts this transactions. Any changes made by this transaction will be discarded.
| |
AddModification |
Adds a modification to this transaction. This method is intended to be called within
custom TransactedObject implementations.
| |
Commit |
Commits this transaction so that its changes are visible to other transactions.
This method may throw TransactionConflictException if another transaction
modifies one of the same values as this transaction and the other transaction commits first.
Use DoTransactionally(ActionTransaction) to automatically retry conflicting
exceptions.
| |
Dispose |
Disposes this transaction. It is safe to call this method on a transaction that
has already been committed or aborted. If it has not already been committed or
aborted, it will be aborted.
| |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |