CLucene - a full-featured, c++ search engine
API Documentation
#include <Lock.h>
Public Member Functions | |
| LUCENE_STATIC_CONSTANT (int64_t, LOCK_POLL_INTERVAL=1000) | |
| LUCENE_STATIC_CONSTANT (int64_t, LOCK_OBTAIN_WAIT_FOREVER=-1) | |
| virtual bool | obtain ()=0 |
| Attempts to obtain exclusive access and immediately return upon success or failure. | |
| bool | obtain (int64_t lockWaitTimeout) |
| Attempts to obtain an exclusive lock within amount of time given. | |
| virtual void | release ()=0 |
| virtual bool | isLocked ()=0 |
| Returns true if the resource is currently locked. | |
| virtual | ~LuceneLock () |
| virtual TCHAR * | toString ()=0 |
| virtual lucene::store::LuceneLock::~LuceneLock | ( | ) | [virtual] |
| lucene::store::LuceneLock::LUCENE_STATIC_CONSTANT | ( | int64_t | , | |
| LOCK_POLL_INTERVAL | = 1000 | |||
| ) |
| lucene::store::LuceneLock::LUCENE_STATIC_CONSTANT | ( | int64_t | , | |
| LOCK_OBTAIN_WAIT_FOREVER | = -1 | |||
| ) |
| virtual bool lucene::store::LuceneLock::obtain | ( | ) | [pure virtual] |
Attempts to obtain exclusive access and immediately return upon success or failure.
| bool lucene::store::LuceneLock::obtain | ( | int64_t | lockWaitTimeout | ) |
Attempts to obtain an exclusive lock within amount of time given.
Currently polls once per second until lockWaitTimeout is passed.
| lockWaitTimeout | length of time to wait in ms |
| IOException | if lock wait times out or obtain() throws an IOException |
| virtual void lucene::store::LuceneLock::release | ( | ) | [pure virtual] |
| virtual bool lucene::store::LuceneLock::isLocked | ( | ) | [pure virtual] |
Returns true if the resource is currently locked.
Note that one must still call obtain() before using the resource.
| virtual TCHAR* lucene::store::LuceneLock::toString | ( | ) | [pure virtual] |