This is an adapter that allows applications to transparently combine the ACE_Lock abstract base class (which contains pure virtual methods) with any of the other concrete ACE synchronization classes (e.g., ACE_Mutex, ACE_Semaphore, ACE_RW_Mutex, etc.).
More...
#include <Lock_Adapter_T.h>
|
ACE_LOCKING_MECHANISM * | lock_ |
| The concrete locking mechanism that all the methods delegate to. More...
|
|
bool | delete_lock_ |
|
template<class ACE_LOCKING_MECHANISM>
class ACE_Lock_Adapter< ACE_LOCKING_MECHANISM >
This is an adapter that allows applications to transparently combine the ACE_Lock abstract base class (which contains pure virtual methods) with any of the other concrete ACE synchronization classes (e.g., ACE_Mutex, ACE_Semaphore, ACE_RW_Mutex, etc.).
This class uses a form of the Adapter pattern.
template<class ACE_LOCKING_MECHANISM>
template<class ACE_LOCKING_MECHANISM>
Constructor. All locking requests will be forwarded to lock.
template<class ACE_LOCKING_MECHANISM>
Constructor. Since no lock is provided by the user, one will be created internally.
template<class ACE_LOCKING_MECHANISM >
Destructor. If lock_
was not passed in by the user, it will be deleted.
template<class ACE_LOCKING_MECHANISM >
Block the thread until the lock is acquired.
Implements ACE_Lock.
template<class ACE_LOCKING_MECHANISM >
Block until the thread acquires a read lock. If the locking mechanism doesn't support read locks then this just calls acquire().
Implements ACE_Lock.
template<class ACE_LOCKING_MECHANISM >
Block until the thread acquires a write lock. If the locking mechanism doesn't support read locks then this just calls acquire().
Implements ACE_Lock.
template<class ACE_LOCKING_MECHANISM >
template<class ACE_LOCKING_MECHANISM >
Explicitly destroy the lock.
Implements ACE_Lock.
template<class ACE_LOCKING_MECHANISM >
Conditionally acquire the lock (i.e., won't block).
Implements ACE_Lock.
template<class ACE_LOCKING_MECHANISM >
Conditionally acquire a read lock. If the locking mechanism doesn't support read locks then this just calls acquire().
Implements ACE_Lock.
template<class ACE_LOCKING_MECHANISM >
Conditionally acquire a write lock. If the locking mechanism doesn't support read locks then this just calls acquire().
Implements ACE_Lock.
template<class ACE_LOCKING_MECHANISM >
int ACE_Lock_Adapter< ACE_LOCKING_MECHANISM >::tryacquire_write_upgrade |
( |
void |
| ) |
|
|
virtual |
Conditionally try to upgrade a lock held for read to a write lock. If the locking mechanism doesn't support read locks then this just calls acquire(). Returns 0 on success, -1 on failure.
Implements ACE_Lock.
template<class ACE_LOCKING_MECHANISM>
This flag keep track of whether we are responsible for deleting the lock
template<class ACE_LOCKING_MECHANISM>
The concrete locking mechanism that all the methods delegate to.
The documentation for this class was generated from the following files: