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


Loading...
Searching...
No Matches
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.
 
void unlock ()
 Unlock mutex.
 
int32_t unlockAll ()
 Unlock all recursive mutex.
 
bool holdsLock ()
 Returns true if mutex is currently locked by current thread.
 

Static Public Member Functions

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

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

◆ Synchronize()

Lucene::Synchronize::Synchronize ( )

◆ ~Synchronize()

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

Member Function Documentation

◆ createSync()

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

create a new Synchronize instance atomically.

◆ holdsLock()

bool Lucene::Synchronize::holdsLock ( )

Returns true if mutex is currently locked by current thread.

◆ lock()

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

Lock mutex using an optional timeout.

◆ unlock()

void Lucene::Synchronize::unlock ( )

Unlock mutex.

◆ unlockAll()

int32_t Lucene::Synchronize::unlockAll ( )

Unlock all recursive mutex.

Field Documentation

◆ lockThread

int64_t Lucene::Synchronize::lockThread
protected

◆ mutexSynchronize

boost::recursive_timed_mutex Lucene::Synchronize::mutexSynchronize
protected

◆ recursionCount

int32_t Lucene::Synchronize::recursionCount
protected

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

clucene.sourceforge.net