C# Class 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.
Inheritance: IDisposable
Afficher le fichier Open project: jbakic/Shielded Class Usage Examples

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
StartTimer ( int ms ) : void

Method Details

Commit() public méthode

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

Dispose() public méthode

If not Completed, calls Rollback.
public Dispose ( ) : void
Résultat void

InContext() public abstract méthode

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
Résultat void

InContext() public méthode

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
Résultat void

Rollback() public méthode

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

TryCommit() public abstract méthode

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
Résultat bool

TryRollback() public abstract méthode

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
Résultat bool