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

clucene.sourceforge.net