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
include
DocFieldConsumers.h
Go to the documentation of this file.
1
2
// 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
16
class
DocFieldConsumers
:
public
DocFieldConsumer
{
17
public
:
18
DocFieldConsumers
(
const
DocFieldConsumerPtr
&
one
,
const
DocFieldConsumerPtr
&
two
);
19
virtual
~DocFieldConsumers
();
20
21
LUCENE_CLASS
(
DocFieldConsumers
);
22
23
public
:
24
DocFieldConsumerPtr
one
;
25
DocFieldConsumerPtr
two
;
26
27
Collection<DocFieldConsumersPerDocPtr>
docFreeList
;
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
46
DocFieldConsumersPerDocPtr
getPerDoc
();
47
void
freePerDoc
(
const
DocFieldConsumersPerDocPtr
& perDoc);
48
};
49
50
class
DocFieldConsumersPerDoc
:
public
DocWriter
{
51
public
:
52
DocFieldConsumersPerDoc
(
const
DocFieldConsumersPtr
& fieldConsumers);
53
virtual
~DocFieldConsumersPerDoc
();
54
55
LUCENE_CLASS
(
DocFieldConsumersPerDoc
);
56
57
protected
:
58
DocFieldConsumersWeakPtr
_fieldConsumers
;
59
60
public
:
61
DocWriterPtr
one
;
62
DocWriterPtr
two
;
63
64
public
:
65
virtual
int64_t
sizeInBytes
();
66
virtual
void
finish
();
67
virtual
void
abort
();
68
};
69
70
}
71
72
#endif
clucene.sourceforge.net