activemq::concurrent::Mutex Class Reference

#include <Mutex.h>

Inheritance diagram for activemq::concurrent::Mutex:

activemq::concurrent::Synchronizable List of all members.

Public Member Functions

 Mutex ()
virtual ~Mutex ()
virtual void lock () throw ( exceptions::ActiveMQException )
virtual void unlock () throw ( exceptions::ActiveMQException )
virtual void wait () throw ( exceptions::ActiveMQException )
virtual void wait (unsigned long millisecs) throw ( exceptions::ActiveMQException )
virtual void notify () throw ( exceptions::ActiveMQException )
virtual void notifyAll () throw ( exceptions::ActiveMQException )

Private Member Functions

bool isLockOwner ()

Private Attributes

CRITICAL_SECTION mutex
std::list< HANDLE > eventQ
int lock_count
unsigned long lock_owner

Detailed Description

Creates a pthread_mutex_t object. The object is created such that successive locks from the same thread is allowed and will be successful.
See also:
pthread_mutex_t


Constructor & Destructor Documentation

activemq::concurrent::Mutex::Mutex  )  [inline]
 

Constructor - creates and initializes the mutex.

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

Destructor - destroys the mutex object.


Member Function Documentation

bool activemq::concurrent::Mutex::isLockOwner  )  [inline, private]
 

Check if the calling thread is the Lock Owner true if the caller is the lock owner

virtual void activemq::concurrent::Mutex::lock  )  throw ( exceptions::ActiveMQException ) [inline, virtual]
 

Locks the object.

Exceptions:
ActiveMQException 

Implements activemq::concurrent::Synchronizable.

virtual void activemq::concurrent::Mutex::notify  )  throw ( exceptions::ActiveMQException ) [inline, virtual]
 

Signals a waiter on this object that it can now wake up and continue.

Exceptions:
ActiveMQException 

Implements activemq::concurrent::Synchronizable.

virtual void activemq::concurrent::Mutex::notifyAll  )  throw ( exceptions::ActiveMQException ) [inline, virtual]
 

Signals the waiters on this object that it can now wake up and continue.

Exceptions:
ActiveMQException 

Implements activemq::concurrent::Synchronizable.

virtual void activemq::concurrent::Mutex::unlock  )  throw ( exceptions::ActiveMQException ) [inline, virtual]
 

Unlocks the object.

Exceptions:
ActiveMQException 

Implements activemq::concurrent::Synchronizable.

virtual void activemq::concurrent::Mutex::wait unsigned long  millisecs  )  throw ( exceptions::ActiveMQException ) [inline, virtual]
 

Waits on a signal from this object, which is generated by a call to Notify. Must have this object locked before calling. This wait will timeout after the specified time interval.

Parameters:
millisecs the time in milliseconds to wait.
Exceptions:
ActiveMQException 

Implements activemq::concurrent::Synchronizable.

virtual void activemq::concurrent::Mutex::wait  )  throw ( exceptions::ActiveMQException ) [inline, virtual]
 

Waits on a signal from this object, which is generated by a call to Notify.

Exceptions:
ActiveMQException 

Implements activemq::concurrent::Synchronizable.


Member Data Documentation

std::list<HANDLE> activemq::concurrent::Mutex::eventQ [private]
 

int activemq::concurrent::Mutex::lock_count [private]
 

unsigned long activemq::concurrent::Mutex::lock_owner [private]
 

CRITICAL_SECTION activemq::concurrent::Mutex::mutex [private]
 

The mutex object.


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