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
Lucene::LuceneSync::holdsLock
virtual bool holdsLock()
Returns true if this object is currently locked by current thread.
Lucene::LuceneSignalPtr
boost::shared_ptr< LuceneSignal > LuceneSignalPtr
Definition: LuceneTypes.h:540
Lucene::LuceneSync::objectSignal
LuceneSignalPtr objectSignal
Definition: LuceneSync.h:21
Lucene::LuceneSync::~LuceneSync
virtual ~LuceneSync()
Lucene::LuceneSync::notifyAll
virtual void notifyAll()
Notify all threads waiting for signal.
Lucene::LuceneSync::wait
virtual void wait(int32_t timeout=0)
Wait for signal using an optional timeout.
Lucene
Definition: AbstractAllTermDocs.h:12
Lucene::SynchronizePtr
boost::shared_ptr< Synchronize > SynchronizePtr
Definition: LuceneTypes.h:552
Lucene::LuceneSync::objectLock
SynchronizePtr objectLock
Definition: LuceneSync.h:20
Lucene::LuceneSync::getSignal
virtual LuceneSignalPtr getSignal()
Return this object signal.
Lucene::LuceneSync::lock
virtual void lock(int32_t timeout=0)
Lock this object using an optional timeout.
Lucene::LuceneSync::unlock
virtual void unlock()
Unlock this object.
Lucene::LuceneSync
Base class for all Lucene synchronised classes.
Definition: LuceneSync.h:15
Lucene::LuceneSync::getSync
virtual SynchronizePtr getSync()
Return this object synchronize lock.

clucene.sourceforge.net