activemq::concurrent::Lock Class Reference

#include <Lock.h>

List of all members.

Public Member Functions

 Lock (Synchronizable *object, const bool intiallyLocked=true)
virtual ~Lock ()
void lock ()
void unlock ()
bool isLocked () const

Private Attributes

bool locked
SynchronizablesyncObject


Detailed Description

A wrapper class around a given synchronization mechanism that provides automatic release upon destruction.
Author:
Nathan Mittler


Constructor & Destructor Documentation

activemq::concurrent::Lock::Lock Synchronizable object,
const bool  intiallyLocked = true
[inline]
 

Constructor - initializes the object member and locks the object if desired.

Parameters:
object The sync object to control
intiallyLocked If true, the object will automatically be locked.

virtual activemq::concurrent::Lock::~Lock  )  [inline, virtual]
 

Destructor - Unlocks the object if it is locked.


Member Function Documentation

bool activemq::concurrent::Lock::isLocked  )  const [inline]
 

Indicates whether or not the object is locked.

Returns:
true if the object is locked, otherwise false.

void activemq::concurrent::Lock::lock  )  [inline]
 

Locks the object.

void activemq::concurrent::Lock::unlock  )  [inline]
 

Unlocks the object.


Member Data Documentation

bool activemq::concurrent::Lock::locked [private]
 

Flag to indicate whether or not this object has locked the sync object.

Synchronizable* activemq::concurrent::Lock::syncObject [private]
 

The synchronizable object to lock/unlock.


The documentation for this class was generated from the following file:
Generated on Thu Aug 3 18:03:31 2006 for activemq-cpp by  doxygen 1.4.5