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

- Main Page
- Related Pages
- Namespaces
- Data Structures
- Files

- File List
- Globals

All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Lock.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2011 Alan Wright. All rights reserved.
3 // Distributable under the terms of either the Apache License (Version 2.0)
4 // or the GNU Lesser General Public License.
6
7 #ifndef LOCK_H
8 #define LOCK_H
9
10 #include "LuceneObject.h"
11
12 namespace Lucene
13 {
16 class LPPAPI Lock : public LuceneObject
17 {
18 public:
19 virtual ~Lock();
20 LUCENE_CLASS(Lock);
21
22 public:
24 static const int32_t LOCK_OBTAIN_WAIT_FOREVER;
25
27 static const int32_t LOCK_POLL_INTERVAL;
28
29 public:
32 virtual bool obtain() = 0;
33
35 virtual void release() = 0;
36
39 virtual bool isLocked() = 0;
40
46 bool obtain(int32_t lockWaitTimeout);
47 };
48 }
49
50 #endif

clucene.sourceforge.net