C# Класс clojure.lang.LockingTransaction

Provides transaction semantics for Agents, Refs, etc.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Abort ( ) : void

Kill this transaction.

GetEx ( ) : LockingTransaction

Get the transaction running on this thread (throw exception if no transaction).

GetReadPoint ( ) : void

Get a new read point value.

ReleaseIfEnsured ( Ref r ) : void
Stop ( int status ) : void

Stop this transaction.

TryWriteLock ( Ref r ) : void

Приватные методы

Метод Описание
Barge ( Info refinfo ) : bool

Try to barge a conflicting transaction.

BargeTimeElapsed ( ) : bool

Determine if sufficient clock time has elapsed to barge another transaction.

BlockAndBail ( Info refinfo ) : object
ContainsNestedRetryEx ( Exception ex ) : bool

Determine if the exception wraps a RetryEx at some level.

Needed because sometimes our retry exceptions get wrapped. You do not want to know how long it took to track down this problem.

DoCommute ( Ref r, IFn fn, ISeq args ) : object

Post a commute on a ref in this transaction.

DoEnsure ( Ref r ) : void

Touch a ref. (Lock it.)

DoGet ( Ref r ) : object

Get the value of a ref most recently set in this transaction (or prior to entering).

DoSet ( Ref r, object val ) : object

Set the value of a ref inside the transaction.

Enqueue ( Agent action ) : void

Add an agent action sent during the transaction to a queue.

GetCommitPoint ( ) : long

Get a commit point value.

GetRunning ( ) : LockingTransaction

Get the transaction running on this thread (or null if no transaction).

Lock ( Ref r ) : object

Lock a ref.

Run ( IFn fn ) : object

Start a transaction and invoke a function.

isRunning ( ) : bool
runInTransaction ( IFn fn ) : object

Описание методов

Abort() публичный Метод

Kill this transaction.
public Abort ( ) : void
Результат void

GetEx() публичный статический Метод

Get the transaction running on this thread (throw exception if no transaction).
public static GetEx ( ) : LockingTransaction
Результат LockingTransaction

GetReadPoint() публичный Метод

Get a new read point value.
public GetReadPoint ( ) : void
Результат void

ReleaseIfEnsured() публичный Метод

public ReleaseIfEnsured ( Ref r ) : void
r Ref
Результат void

Stop() публичный Метод

Stop this transaction.
public Stop ( int status ) : void
status int The new status.
Результат void

TryWriteLock() публичный Метод

public TryWriteLock ( Ref r ) : void
r Ref
Результат void