C# 클래스 clojure.lang.LockingTransaction

Provides transaction semantics for Agents, Refs, etc.
파일 보기 프로젝트 열기: richhickey/clojure-clr 1 사용 예제들

공개 메소드들

메소드 설명
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