lucene::store::LuceneLock Class Reference
#include <Lock.h>
List of all members.
Public Member Functions |
| | LUCENE_STATIC_CONSTANT (int64_t, LOCK_POLL_INTERVAL=1000) |
| 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 |
Constructor & Destructor Documentation
| virtual lucene::store::LuceneLock::~LuceneLock |
( |
|
) |
[inline, virtual] |
Member Function Documentation
| 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.
| lucene::store::LuceneLock::LUCENE_STATIC_CONSTANT |
( |
int64_t |
, |
|
|
LOCK_POLL_INTERVAL |
= 1000 | |
|
) |
| | |
| 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.
- Parameters:
-
| lockWaitTimeout | length of time to wait in ms |
- Returns:
- true if lock was obtained
- Exceptions:
-
| IOException | if lock wait times out or obtain() throws an IOException |
| virtual bool lucene::store::LuceneLock::obtain |
( |
|
) |
[pure virtual] |
Attempts to obtain exclusive access and immediately return upon success or failure.
- Returns:
- true iff exclusive access is obtained
| virtual void lucene::store::LuceneLock::release |
( |
|
) |
[pure virtual] |
| virtual TCHAR* lucene::store::LuceneLock::toString |
( |
|
) |
[pure virtual] |
The documentation for this class was generated from the following file: