C# 클래스 Shielded.CommitContinuation

An object used to commit a transaction at a later time, or from another thread. Returned by Shield.RunToCommit. The transaction has been checked, and is OK to commit. This class is thread-safe - it makes sure only one thread can initiate a commit, but any number of threads may try a rollback in parallel.
상속: IDisposable
파일 보기 프로젝트 열기: jbakic/Shielded 1 사용 예제들

공개 메소드들

메소드 설명
Commit ( ) : void

Commit the transaction held in this continuation. Throws if it's already completing/ed.

Dispose ( ) : void

If not Completed, calls Rollback.

InContext ( System.Action act ) : void

Run the action inside the transaction context. Access is limited to exactly what the main transaction already did. Throws if the continuation has completed, dangerous if it is completing.

InContext ( Action act ) : void

Run the action inside the transaction context, with information on the transaction's access pattern given in its argument. Access is limited to exactly what the main transaction already did. Throws if the continuation has completed, dangerous if it is completing.

Rollback ( ) : void

Roll back the transaction held in this continuation. Throws if already completing/ed.

TryCommit ( ) : bool

Try to commit the transaction held in this continuation, returning true if successful. It returns true only if this call actually did the full commit.

TryRollback ( ) : bool

Try to roll back the transaction held in this continuation, returning true if successful. Returns true only if this call actually performs the rollback.

비공개 메소드들

메소드 설명
StartTimer ( int ms ) : void

메소드 상세

Commit() 공개 메소드

Commit the transaction held in this continuation. Throws if it's already completing/ed.
public Commit ( ) : void
리턴 void

Dispose() 공개 메소드

If not Completed, calls Rollback.
public Dispose ( ) : void
리턴 void

InContext() 공개 추상적인 메소드

Run the action inside the transaction context. Access is limited to exactly what the main transaction already did. Throws if the continuation has completed, dangerous if it is completing.
public abstract InContext ( System.Action act ) : void
act System.Action
리턴 void

InContext() 공개 메소드

Run the action inside the transaction context, with information on the transaction's access pattern given in its argument. Access is limited to exactly what the main transaction already did. Throws if the continuation has completed, dangerous if it is completing.
public InContext ( Action act ) : void
act Action
리턴 void

Rollback() 공개 메소드

Roll back the transaction held in this continuation. Throws if already completing/ed.
public Rollback ( ) : void
리턴 void

TryCommit() 공개 추상적인 메소드

Try to commit the transaction held in this continuation, returning true if successful. It returns true only if this call actually did the full commit.
public abstract TryCommit ( ) : bool
리턴 bool

TryRollback() 공개 추상적인 메소드

Try to roll back the transaction held in this continuation, returning true if successful. Returns true only if this call actually performs the rollback.
public abstract TryRollback ( ) : bool
리턴 bool