#include <Lock_Adapter_T.h>
Inheritance diagram for ACE_Lock_Adapter< ACE_LOCKING_MECHANISM >:
Public Types | |
typedef ACE_LOCKING_MECHANISM | ACE_LOCK |
Public Methods | |
ACE_Lock_Adapter (ACE_LOCKING_MECHANISM &lock) | |
Constructor. All locking requests will be forwarded to <lock>. | |
ACE_Lock_Adapter (void) | |
virtual | ~ACE_Lock_Adapter (void) |
virtual int | acquire (void) |
Block the thread until the lock is acquired. | |
virtual int | tryacquire (void) |
Conditionally acquire the lock (i.e., won't block). | |
virtual int | release (void) |
Release the lock. | |
virtual int | acquire_read (void) |
virtual int | acquire_write (void) |
virtual int | tryacquire_read (void) |
virtual int | tryacquire_write (void) |
virtual int | tryacquire_write_upgrade (void) |
virtual int | remove (void) |
Explicitly destroy the lock. | |
Private Attributes | |
ACE_LOCKING_MECHANISM * | lock_ |
The concrete locking mechanism that all the methods delegate to. | |
int | delete_lock_ |
This class uses a form of the Adapter pattern.
|
|
|
Constructor. All locking requests will be forwarded to <lock>.
|
|
Constructor. Since no lock is provided by the user, one will be created internally. |
|
Destructor. If <lock_> was not passed in by the user, it will be deleted. |
|
Block the thread until the lock is acquired.
Implements ACE_Lock. |
|
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. |
|
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. |
|
Release the lock.
Implements ACE_Lock. |
|
Explicitly destroy the lock.
Implements ACE_Lock. |
|
Conditionally acquire the lock (i.e., won't block).
Implements ACE_Lock. |
|
Conditionally acquire a read lock. If the locking mechanism doesn't support read locks then this just calls <acquire>. Implements ACE_Lock. |
|
Conditionally acquire a write lock. If the locking mechanism doesn't support read locks then this just calls <acquire>. Implements ACE_Lock. |
|
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. |
|
This flag keep track of whether we are responsible for deleting the lock |
|
The concrete locking mechanism that all the methods delegate to.
|