Simias::Storage::LogMutex Class Reference

Class used to implement an inprocess mutex that protects the log file from reentrancy. More...

List of all members.

Public Member Functions

 LogMutex (string collectionID)
 Initializes a new instance of the Mutex class with default properties.
 LogMutex (string collectionID, bool initiallyOwned)
 Initializes a new instance of the Mutex class with a Boolean value indicating whether the calling thread should have initial ownership of the mutex.
void Close (string collectionID)
 Releases all resources held by the current WaitHandle.
void ReleaseMutex (string collectionID)
 Releases the mutex once.
bool WaitOne (string collectionID)
 Blocks the current thread until the current WaitHandle receives a signal.
bool WaitOne (string collectionID, int millisecondsTimeout, bool exitContext)
 Blocks the current thread until the current WaitHandle receives a signal, using 32-bit signed integer to measure the time interval and specifying whether to exit the synchronization domain before the wait.
bool WaitOne (string collectionID, TimeSpan timeout, bool exitContext)
 Blocks the current thread until the current instance receives a signal, using a TimeSpan to measure the time interval and specifying whether to exit the synchronization domain before the wait.


Detailed Description

Class used to implement an inprocess mutex that protects the log file from reentrancy.


Constructor & Destructor Documentation

Simias::Storage::LogMutex::LogMutex ( string  collectionID  )  [inline]

Initializes a new instance of the Mutex class with default properties.

Parameters:
collectionID Identifier of the collection associated with the log file.

Simias::Storage::LogMutex::LogMutex ( string  collectionID,
bool  initiallyOwned 
) [inline]

Initializes a new instance of the Mutex class with a Boolean value indicating whether the calling thread should have initial ownership of the mutex.

Parameters:
collectionID Identifier of the collection associated with the log file.
initiallyOwned true to give the calling thread initial ownership of the mutex; otherwise, false.


Member Function Documentation

void Simias::Storage::LogMutex::Close ( string  collectionID  )  [inline]

Releases all resources held by the current WaitHandle.

Parameters:
collectionID Identifier of the collection associated with the log file.

void Simias::Storage::LogMutex::ReleaseMutex ( string  collectionID  )  [inline]

Releases the mutex once.

Parameters:
collectionID Identifier of the collection associated with the log file.

bool Simias::Storage::LogMutex::WaitOne ( string  collectionID  )  [inline]

Blocks the current thread until the current WaitHandle receives a signal.

Parameters:
collectionID Identifier of the collection associated with the log file.
Returns:
true if the current instance receives a signal. If the current instance is never signaled, WaitOne never returns.

bool Simias::Storage::LogMutex::WaitOne ( string  collectionID,
int  millisecondsTimeout,
bool  exitContext 
) [inline]

Blocks the current thread until the current WaitHandle receives a signal, using 32-bit signed integer to measure the time interval and specifying whether to exit the synchronization domain before the wait.

Parameters:
collectionID Identifier of the collection associated with the log file.
millisecondsTimeout The number of milliseconds to wait, or Timeout.Infinite (-1) to wait indefinitely.
exitContext true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it; otherwise, false.
Returns:
true if the current instance receives a signal; otherwise, false.

bool Simias::Storage::LogMutex::WaitOne ( string  collectionID,
TimeSpan  timeout,
bool  exitContext 
) [inline]

Blocks the current thread until the current instance receives a signal, using a TimeSpan to measure the time interval and specifying whether to exit the synchronization domain before the wait.

Parameters:
collectionID Identifier of the collection associated with the log file.
timeout The number of milliseconds to wait, or a TimeSpan that represents -1 milliseconds to wait indefinitely.
exitContext true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it; otherwise, false.
Returns:
true if the current instance receives a signal; otherwise, false.


The documentation for this class was generated from the following file:

Generated on Wed Apr 8 14:52:53 2009 for simias by  doxygen 1.5.6