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


LuceneSync.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2014 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 LUCENESYNC_H
8 #define LUCENESYNC_H
9 
10 #include "Lucene.h"
11 
12 namespace Lucene {
13 
15 class LPPAPI LuceneSync {
16 public:
17  virtual ~LuceneSync();
18 
19 protected:
22 
23 public:
26 
29 
31  virtual void lock(int32_t timeout = 0);
32 
34  virtual void unlock();
35 
37  virtual bool holdsLock();
38 
40  virtual void wait(int32_t timeout = 0);
41 
43  virtual void notifyAll();
44 };
45 
46 }
47 
48 #endif
Base class for all Lucene synchronised classes.
Definition: LuceneSync.h:15
virtual void wait(int32_t timeout=0)
Wait for signal using an optional timeout.
virtual void unlock()
Unlock this object.
virtual SynchronizePtr getSync()
Return this object synchronize lock.
virtual ~LuceneSync()
virtual void notifyAll()
Notify all threads waiting for signal.
virtual void lock(int32_t timeout=0)
Lock this object using an optional timeout.
virtual LuceneSignalPtr getSignal()
Return this object signal.
virtual bool holdsLock()
Returns true if this object is currently locked by current thread.
LuceneSignalPtr objectSignal
Definition: LuceneSync.h:21
SynchronizePtr objectLock
Definition: LuceneSync.h:20
Definition: AbstractAllTermDocs.h:12
boost::shared_ptr< Synchronize > SynchronizePtr
Definition: LuceneTypes.h:552
boost::shared_ptr< LuceneSignal > LuceneSignalPtr
Definition: LuceneTypes.h:540

clucene.sourceforge.net