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 
47  void freePerDoc(const DocFieldConsumersPerDocPtr& perDoc);
48 };
49 
51 public:
52  DocFieldConsumersPerDoc(const DocFieldConsumersPtr& fieldConsumers);
53  virtual ~DocFieldConsumersPerDoc();
54 
56 
57 protected:
58  DocFieldConsumersWeakPtr _fieldConsumers;
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
boost::shared_ptr< DocFieldProcessorPerThread > DocFieldProcessorPerThreadPtr
Definition: LuceneTypes.h:117
virtual void setFieldInfos(const FieldInfosPtr &fieldInfos)
DocWriterPtr two
Definition: DocFieldConsumers.h:62
DocFieldConsumerPtr two
Definition: DocFieldConsumers.h:25
boost::shared_ptr< DocFieldConsumerPerThread > DocFieldConsumerPerThreadPtr
Definition: LuceneTypes.h:110
DocFieldConsumers(const DocFieldConsumerPtr &one, const DocFieldConsumerPtr &two)
boost::shared_ptr< DocFieldConsumers > DocFieldConsumersPtr
Definition: LuceneTypes.h:111
Definition: DocFieldConsumer.h:14
int32_t allocCount
Definition: DocFieldConsumers.h:29
DocFieldConsumerPtr one
Definition: DocFieldConsumers.h:21
boost::weak_ptr< DocFieldConsumers > DocFieldConsumersWeakPtr
Definition: LuceneTypes.h:111
virtual void abort()=0
Called when an aborting exception is hit.
virtual void closeDocStore(const SegmentWriteStatePtr &state)
Called when DocumentsWriter decides to close the doc stores.
DocWriterPtr one
Definition: DocFieldConsumers.h:61
boost::shared_ptr< DocFieldConsumer > DocFieldConsumerPtr
Definition: LuceneTypes.h:108
void freePerDoc(const DocFieldConsumersPerDocPtr &perDoc)
virtual void flush(MapDocFieldConsumerPerThreadCollectionDocFieldConsumerPerField threadsAndFields, const SegmentWriteStatePtr &state)
Called when DocumentsWriter decides to create a new segment.
Collection< DocFieldConsumersPerDocPtr > docFreeList
Definition: DocFieldConsumers.h:27
virtual bool freeRAM()
Called when DocumentsWriter is using too much RAM.
virtual DocFieldConsumerPerThreadPtr addThread(const DocFieldProcessorPerThreadPtr &docFieldProcessorPerThread)
Add a new thread.
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
Definition: AbstractAllTermDocs.h:12
This is just a "splitter" class: it lets you wrap two DocFieldConsumer instances as a single consumer...
Definition: DocFieldConsumers.h:16
FieldInfosPtr fieldInfos
Definition: DocFieldConsumer.h:18
DocFieldConsumersPerDocPtr getPerDoc()
Definition: DocFieldConsumers.h:50
Consumer returns this on each doc. This holds any state that must be flushed synchronized "in docID o...
Definition: DocumentsWriter.h:402
boost::shared_ptr< SegmentWriteState > SegmentWriteStatePtr
Definition: LuceneTypes.h:222
int32_t freeCount
Definition: DocFieldConsumers.h:28
boost::shared_ptr< DocWriter > DocWriterPtr
Definition: LuceneTypes.h:125
boost::shared_ptr< FieldInfos > FieldInfosPtr
Definition: LuceneTypes.h:127
boost::shared_ptr< DocFieldConsumersPerDoc > DocFieldConsumersPerDocPtr
Definition: LuceneTypes.h:112

clucene.sourceforge.net