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

- Main Page
- Related Pages
- Namespaces
- Data Structures
- Files

- File List
- Globals

All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
DocFieldConsumers.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2011 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 {
16 class DocFieldConsumers : public DocFieldConsumer
17 {
18 public:
19 DocFieldConsumers(DocFieldConsumerPtr one, DocFieldConsumerPtr two);
20 virtual ~DocFieldConsumers();
21
22 LUCENE_CLASS(DocFieldConsumers);
23
24 public:
25 DocFieldConsumerPtr one;
26 DocFieldConsumerPtr two;
27
28 Collection<DocFieldConsumersPerDocPtr> docFreeList;
29 int32_t freeCount;
30 int32_t allocCount;
31
32 public:
33 virtual void setFieldInfos(FieldInfosPtr fieldInfos);
34
36 virtual void flush(MapDocFieldConsumerPerThreadCollectionDocFieldConsumerPerField threadsAndFields, SegmentWriteStatePtr state);
37
39 virtual void closeDocStore(SegmentWriteStatePtr state);
40
42 virtual bool freeRAM();
43
45 virtual DocFieldConsumerPerThreadPtr addThread(DocFieldProcessorPerThreadPtr docFieldProcessorPerThread);
46
47 DocFieldConsumersPerDocPtr getPerDoc();
48 void freePerDoc(DocFieldConsumersPerDocPtr perDoc);
49 };
50
51 class DocFieldConsumersPerDoc : public DocWriter
52 {
53 public:
54 DocFieldConsumersPerDoc(DocFieldConsumersPtr fieldConsumers);
55 virtual ~DocFieldConsumersPerDoc();
56
57 LUCENE_CLASS(DocFieldConsumersPerDoc);
58
59 protected:
60 DocFieldConsumersWeakPtr _fieldConsumers;
61
62 public:
63 DocWriterPtr one;
64 DocWriterPtr two;
65
66 public:
67 virtual int64_t sizeInBytes();
68 virtual void finish();
69 virtual void abort();
70 };
71 }
72
73 #endif

clucene.sourceforge.net