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


lucene::store::LuceneLockWith< T > Class Template Reference

#include <Lock.h>

List of all members.

Public Member Functions

 LuceneLockWith (LuceneLock *lock, int64_t lockWaitTimeout)
 Constructs an executor that will grab the named lock.
virtual ~LuceneLockWith ()
runAndReturn ()
 Calls doBody while lock is obtained.
void run ()

Protected Member Functions

virtual T doBody ()=0

template<typename T>
class lucene::store::LuceneLockWith< T >


Constructor & Destructor Documentation

template<typename T>
lucene::store::LuceneLockWith< T >::LuceneLockWith ( LuceneLock lock,
int64_t  lockWaitTimeout 
) [inline]

Constructs an executor that will grab the named lock.

Defaults lockWaitTimeout to LUCENE_COMMIT_LOCK_TIMEOUT.

Deprecated:
Kept only to avoid breaking existing code.
template<typename T>
virtual lucene::store::LuceneLockWith< T >::~LuceneLockWith (  )  [inline, virtual]

Member Function Documentation

template<typename T>
virtual T lucene::store::LuceneLockWith< T >::doBody (  )  [protected, pure virtual]
template<typename T>
void lucene::store::LuceneLockWith< T >::run (  )  [inline]
See also:
runAndReturn Same as runAndReturn, except doesn't return any value. The only difference is that no void values are used
template<typename T>
T lucene::store::LuceneLockWith< T >::runAndReturn (  )  [inline]

Calls doBody while lock is obtained.

Blocks if lock cannot be obtained immediately. Retries to obtain lock once per second until it is obtained, or until it has tried ten times. Lock is released when doBody exits.


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

clucene.sourceforge.net