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


DocFieldConsumers.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 DOCFIELDCONSUMERS_H
8 #define DOCFIELDCONSUMERS_H
9 
10 #include "DocFieldConsumer.h"
11 #include "DocumentsWriter.h"
12 
13 namespace Lucene {
14 
17 public:
19  virtual ~DocFieldConsumers();
20 
22 
23 public:
26 
28  int32_t freeCount;
29  int32_t allocCount;
30 
31 public:
32  virtual void setFieldInfos(const FieldInfosPtr& fieldInfos);
33 
35  virtual void flush(MapDocFieldConsumerPerThreadCollectionDocFieldConsumerPerField threadsAndFields, const SegmentWriteStatePtr& state);
36 
38  virtual void closeDocStore(const SegmentWriteStatePtr& state);
39 
41  virtual bool freeRAM();
42 
44  virtual DocFieldConsumerPerThreadPtr addThread(const DocFieldProcessorPerThreadPtr& docFieldProcessorPerThread);
45 
48 };
49 
51 public:
54 
56 
57 protected:
59 
60 public:
63 
64 public:
65  virtual int64_t sizeInBytes();
66  virtual void finish();
67  virtual void abort();
68 };
69 
70 }
71 
72 #endif
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
Definition: DocFieldConsumer.h:14
FieldInfosPtr fieldInfos
Definition: DocFieldConsumer.h:18
Definition: DocFieldConsumers.h:50
DocFieldConsumersWeakPtr _fieldConsumers
Definition: DocFieldConsumers.h:55
DocWriterPtr one
Definition: DocFieldConsumers.h:61
DocWriterPtr two
Definition: DocFieldConsumers.h:62
DocFieldConsumersPerDoc(const DocFieldConsumersPtr &fieldConsumers)
This is just a "splitter" class: it lets you wrap two DocFieldConsumer instances as a single consumer...
Definition: DocFieldConsumers.h:16
virtual DocFieldConsumerPerThreadPtr addThread(const DocFieldProcessorPerThreadPtr &docFieldProcessorPerThread)
Add a new thread.
Collection< DocFieldConsumersPerDocPtr > docFreeList
Definition: DocFieldConsumers.h:27
DocFieldConsumers(const DocFieldConsumerPtr &one, const DocFieldConsumerPtr &two)
int32_t allocCount
Definition: DocFieldConsumers.h:29
virtual void closeDocStore(const SegmentWriteStatePtr &state)
Called when DocumentsWriter decides to close the doc stores.
int32_t freeCount
Definition: DocFieldConsumers.h:28
DocFieldConsumerPtr two
Definition: DocFieldConsumers.h:25
virtual bool freeRAM()
Called when DocumentsWriter is using too much RAM.
void freePerDoc(const DocFieldConsumersPerDocPtr &perDoc)
DocFieldConsumerPtr one
Definition: DocFieldConsumers.h:21
virtual void flush(MapDocFieldConsumerPerThreadCollectionDocFieldConsumerPerField threadsAndFields, const SegmentWriteStatePtr &state)
Called when DocumentsWriter decides to create a new segment.
virtual void setFieldInfos(const FieldInfosPtr &fieldInfos)
DocFieldConsumersPerDocPtr getPerDoc()
Consumer returns this on each doc. This holds any state that must be flushed synchronized "in docID o...
Definition: DocumentsWriter.h:402
Definition: AbstractAllTermDocs.h:12
boost::shared_ptr< DocFieldConsumers > DocFieldConsumersPtr
Definition: LuceneTypes.h:111
boost::shared_ptr< FieldInfos > FieldInfosPtr
Definition: LuceneTypes.h:127
boost::weak_ptr< DocFieldConsumers > DocFieldConsumersWeakPtr
Definition: LuceneTypes.h:111
boost::shared_ptr< SegmentWriteState > SegmentWriteStatePtr
Definition: LuceneTypes.h:222
boost::shared_ptr< DocFieldConsumer > DocFieldConsumerPtr
Definition: LuceneTypes.h:108
boost::shared_ptr< DocFieldConsumerPerThread > DocFieldConsumerPerThreadPtr
Definition: LuceneTypes.h:110
boost::shared_ptr< DocWriter > DocWriterPtr
Definition: LuceneTypes.h:125
boost::shared_ptr< DocFieldConsumersPerDoc > DocFieldConsumersPerDocPtr
Definition: LuceneTypes.h:112
boost::shared_ptr< DocFieldProcessorPerThread > DocFieldProcessorPerThreadPtr
Definition: LuceneTypes.h:117

clucene.sourceforge.net