C# Class Lucene.Net.Store.Lock.With

Utility class for executing code with exclusive access.
Afficher le fichier Open project: paulirwin/lucene.net

Méthodes publiques

Méthode Description
Run ( ) : object

Calls #doBody while lock is obtained. Blocks if lock cannot be obtained immediately. Retries to obtain lock once per second until it is obtained, or until it has tried ten times. Lock is released when #doBody exits.

With ( Lock @lock, long lockWaitTimeout ) : System

Constructs an executor that will grab the named lock.

Méthodes protégées

Méthode Description
DoBody ( ) : object

Code to execute with exclusive access.

Method Details

DoBody() protected abstract méthode

Code to execute with exclusive access.
protected abstract DoBody ( ) : object
Résultat object

Run() public méthode

Calls #doBody while lock is obtained. Blocks if lock cannot be obtained immediately. Retries to obtain lock once per second until it is obtained, or until it has tried ten times. Lock is released when #doBody exits.
if lock could not /// be obtained if throws System.IO.IOException
public Run ( ) : object
Résultat object

With() public méthode

Constructs an executor that will grab the named lock.
public With ( Lock @lock, long lockWaitTimeout ) : System
@lock Lock
lockWaitTimeout long
Résultat System