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

LuceneSignal.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 LUCENESIGNAL_H
8 #define LUCENESIGNAL_H
9
10 #include <boost/thread/condition.hpp>
11 #include "Lucene.h"
12
13 namespace Lucene {
14
16 class LPPAPI LuceneSignal {
17 public:
18 LuceneSignal(const SynchronizePtr& objectLock = SynchronizePtr());
19 virtual ~LuceneSignal();
20
21 protected:
22 boost::mutex waitMutex;
23 boost::condition signalCondition;
24 SynchronizePtr objectLock;
25
26 public:
28 static void createSignal(LuceneSignalPtr& signal, const SynchronizePtr& objectLock);
29
31 void wait(int32_t timeout = 0);
32
34 void notifyAll();
35 };
36
37 }
38
39 #endif
Lucene::LuceneSignalPtr
boost::shared_ptr< LuceneSignal > LuceneSignalPtr
Definition: LuceneTypes.h:540
Lucene::LuceneSignal::signalCondition
boost::condition signalCondition
Definition: LuceneSignal.h:23
Lucene
Definition: AbstractAllTermDocs.h:12
Lucene::LuceneSignal::objectLock
SynchronizePtr objectLock
Definition: LuceneSignal.h:24
Lucene::LuceneSignal::waitMutex
boost::mutex waitMutex
Definition: LuceneSignal.h:22
Lucene::LuceneSignal
Utility class to support signaling notifications.
Definition: LuceneSignal.h:16
Lucene::SynchronizePtr
boost::shared_ptr< Synchronize > SynchronizePtr
Definition: LuceneTypes.h:552

clucene.sourceforge.net