decaf::util::concurrent::Lock Class Reference

A wrapper class around a given synchronization mechanism that provides automatic release upon destruction. More...

#include <src/main/decaf/util/concurrent/Lock.h>

Public Member Functions

 Lock (Synchronizable *object, const bool intiallyLocked=true)
 Constructor - initializes the object member and locks the object if desired.
virtual ~Lock ()
 Destructor - Unlocks the object if it is locked.
void lock ()
 Locks the object.
void unlock ()
 Unlocks the object if it is already locked, otherwise a call to this method has no effect.
bool isLocked () const
 Indicates whether or not the object is locked.

Detailed Description

A wrapper class around a given synchronization mechanism that provides automatic release upon destruction.

Since:
1.0

Constructor & Destructor Documentation

decaf::util::concurrent::Lock::Lock ( Synchronizable object,
const bool  intiallyLocked = true 
)

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 decaf::util::concurrent::Lock::~Lock (  )  [virtual]

Destructor - Unlocks the object if it is locked.


Member Function Documentation

bool decaf::util::concurrent::Lock::isLocked (  )  const [inline]

Indicates whether or not the object is locked.

Returns:
true if the object is locked, otherwise false.
void decaf::util::concurrent::Lock::lock (  ) 

Locks the object.

void decaf::util::concurrent::Lock::unlock (  ) 

Unlocks the object if it is already locked, otherwise a call to this method has no effect.


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

Generated on 1 Dec 2014 for activemq-cpp-3.8.2 by  doxygen 1.6.1