Manager of the read/write lock resource. More...
#include <ReadWriteLock.hh>
Classes | |
class | impl |
Public Member Functions | |
baton_type (bool Logging=true) | |
Constructor. | |
baton_type (bool Logging=true) | |
Constructor. | |
void * | Handle () |
Return pointer to low level data storage. | |
void * | Handle () |
Return pointer to low level data storage. | |
void | Lock (mode_type Mode, const char *const File, const size_t Line) |
Request the resource to be locked. | |
void | Lock (mode_type Mode, bool TryLock, const char *const File, const size_t Line) |
Request the resource to be locked. | |
void | Lock (mode_type Mode, size_t Timeout, const char *const File, const size_t Line) |
Request the resource to be locked. | |
void | Lock (mode_type Mode, const char *const File, const size_t Line) |
Request the resource to be locked. | |
void | Lock (mode_type Mode, bool TryLock, const char *const File, const size_t Line) |
Request the resource to be locked. | |
void | Lock (mode_type Mode, size_t Timeout, const char *const File, const size_t Line) |
Request the resource to be locked. | |
void | TryLock (mode_type Mode, const char *const File, const size_t Line) |
Request the resource to be locked without waiting. | |
void | TryLock (mode_type Mode, const char *const File, const size_t Line) |
Request the resource to be locked without waiting. | |
void | Unlock (const char *const File, const size_t Line) |
Release any locks held on the resource. | |
void | Unlock (const char *const File, const size_t Line) |
Release any locks held on the resource. | |
void | reset () |
Destroy the resources associated with this instance. | |
void | reset () |
Destroy the resources associated with this instance. | |
Private Attributes | |
boost::shared_ptr< impl > | p |
Static Private Attributes | |
static int | retry_count_max = 10 |
Friends | |
void * | ReadWriteLockBatonHandle (ReadWriteLock::baton_type Baton) |
void * | ReadWriteLockBatonHandle (ReadWriteLock::baton_type Baton) |
Manager of the read/write lock resource.
LDASTools::AL::ReadWriteLock::baton_type::baton_type | ( | bool | Logging = true | ) |
Constructor.
[in] | Logging | If true, then all actions associated with this instance will be logged for DeadLockDetector. |
LDASTools::AL::ReadWriteLock::baton_type::baton_type | ( | bool | Logging = true | ) |
Constructor.
[in] | Logging | If true, then all actions associated with this instance will be logged for DeadLockDetector. |
void * LDASTools::AL::ReadWriteLock::baton_type::Handle | ( | ) |
Return pointer to low level data storage.
void * LDASTools::AL::ReadWriteLock::baton_type::Handle | ( | ) |
Return pointer to low level data storage.
void LDASTools::AL::ReadWriteLock::baton_type::Lock | ( | mode_type | Mode, |
bool | TryLock, | ||
const char *const | File, | ||
const size_t | Line ) |
Request the resource to be locked.
[in] | Mode | Any of the lock_modes. |
[in] | TryLock | If true, then return immediately wether or not the lock was obtained. |
[in] | File | The filename from where the call was made. |
[in] | Line | The line number from where the call was made. |
void LDASTools::AL::ReadWriteLock::baton_type::Lock | ( | mode_type | Mode, |
bool | TryLock, | ||
const char *const | File, | ||
const size_t | Line ) |
Request the resource to be locked.
[in] | Mode | Any of the lock_modes. |
[in] | TryLock | If true, then return immediately wether or not the lock was obtained. |
[in] | File | The filename from where the call was made. |
[in] | Line | The line number from where the call was made. |
|
inline |
Request the resource to be locked.
[in] | Mode | Any of the lock_modes. |
[in] | File | The filename from where the call was made. |
[in] | Line | The line number from where the call was made. |
void LDASTools::AL::ReadWriteLock::baton_type::Lock | ( | mode_type | Mode, |
const char *const | File, | ||
const size_t | Line ) |
Request the resource to be locked.
[in] | Mode | Any of the lock_modes. |
[in] | File | The filename from where the call was made. |
[in] | Line | The line number from where the call was made. |
void LDASTools::AL::ReadWriteLock::baton_type::Lock | ( | mode_type | Mode, |
size_t | Timeout, | ||
const char *const | File, | ||
const size_t | Line ) |
Request the resource to be locked.
[in] | Mode | Any of the lock_modes. |
[in] | Timeout | Time limit in seconds in which to acquire the lock. A value of zero (0) indicates that the method should wait until the lock is granted. |
[in] | File | The filename from where the call was made. |
[in] | Line | The line number from where the call was made. |
void LDASTools::AL::ReadWriteLock::baton_type::Lock | ( | mode_type | Mode, |
size_t | Timeout, | ||
const char *const | File, | ||
const size_t | Line ) |
Request the resource to be locked.
[in] | Mode | Any of the lock_modes. |
[in] | Timeout | Time limit in seconds in which to acquire the lock. A value of zero (0) indicates that the method should wait until the lock is granted. |
[in] | File | The filename from where the call was made. |
[in] | Line | The line number from where the call was made. |
|
inline |
Destroy the resources associated with this instance.
void LDASTools::AL::ReadWriteLock::baton_type::reset | ( | ) |
Destroy the resources associated with this instance.
|
inline |
Request the resource to be locked without waiting.
[in] | Mode | Any of the lock_modes. |
[in] | File | The filename from where the call was made. |
[in] | Line | The line number from where the call was made. |
The TryLock method tries to lock the resouce. If the resouce is locked prior to this call, then the method returns immediately by throwing the ReadWriteLock::BusyError exception.
void LDASTools::AL::ReadWriteLock::baton_type::TryLock | ( | mode_type | Mode, |
const char *const | File, | ||
const size_t | Line ) |
Request the resource to be locked without waiting.
[in] | Mode | Any of the lock_modes. |
[in] | File | The filename from where the call was made. |
[in] | Line | The line number from where the call was made. |
void LDASTools::AL::ReadWriteLock::baton_type::Unlock | ( | const char *const | File, |
const size_t | Line ) |
Release any locks held on the resource.
[in] | File | The filename from where the call was made. |
[in] | Line | The line number from where the call was made. |
void LDASTools::AL::ReadWriteLock::baton_type::Unlock | ( | const char *const | File, |
const size_t | Line ) |
Release any locks held on the resource.
[in] | File | The filename from where the call was made. |
[in] | Line | The line number from where the call was made. |
|
friend |
|
friend |
|
private |
|
staticprivate |