Lucene++ - a full-featured, c++ search engine
API Documentation


 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | Static Public Member Functions | Protected Attributes
Lucene::Synchronize Class Reference

Utility class to support locking via a mutex. More...

#include <Synchronize.h>

Public Member Functions

 Synchronize ()
 
virtual ~Synchronize ()
 
void lock (int32_t timeout=0)
 Lock mutex using an optional timeout. More...
 
void unlock ()
 Unlock mutex. More...
 
int32_t unlockAll ()
 Unlock all recursive mutex. More...
 
bool holdsLock ()
 Returns true if mutex is currently locked by current thread. More...
 

Static Public Member Functions

static void createSync (SynchronizePtr &sync)
 create a new Synchronize instance atomically. More...
 

Protected Attributes

boost::recursive_timed_mutex mutexSynchronize
 
int64_t lockThread
 
int32_t recursionCount
 

Detailed Description

Utility class to support locking via a mutex.

Constructor & Destructor Documentation

Lucene::Synchronize::Synchronize ( )
virtual Lucene::Synchronize::~Synchronize ( )
virtual

Member Function Documentation

static void Lucene::Synchronize::createSync ( SynchronizePtr sync)
static

create a new Synchronize instance atomically.

bool Lucene::Synchronize::holdsLock ( )

Returns true if mutex is currently locked by current thread.

void Lucene::Synchronize::lock ( int32_t  timeout = 0)

Lock mutex using an optional timeout.

void Lucene::Synchronize::unlock ( )

Unlock mutex.

int32_t Lucene::Synchronize::unlockAll ( )

Unlock all recursive mutex.

Field Documentation

int64_t Lucene::Synchronize::lockThread
protected
boost::recursive_timed_mutex Lucene::Synchronize::mutexSynchronize
protected
int32_t Lucene::Synchronize::recursionCount
protected

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

clucene.sourceforge.net