Lucene++ - a full-featured, c++ search engine
API Documentation
Combines multiple files into a single compound file. The file format: VInt fileCount {Directory} fileCount entries with the following structure: int64_t dataOffset String fileName {File Data} fileCount entries with the raw data of the corresponding file. More...
#include <CompoundFileWriter.h>
Data Structures | |
| struct | FileEntry |
Public Member Functions | |
| CompoundFileWriter (const DirectoryPtr &dir, const String &name, const CheckAbortPtr &checkAbort=CheckAbortPtr()) | |
| virtual | ~CompoundFileWriter () |
| virtual String | getClassName () |
| boost::shared_ptr< CompoundFileWriter > | shared_from_this () |
| DirectoryPtr | getDirectory () |
| Returns the directory of the compound file. | |
| String | getName () |
| Returns the name of the compound file. | |
| void | addFile (const String &file) |
| Add a source stream. file is the string by which the sub-stream will be known in the compound stream. | |
| void | close () |
| Merge files with the extensions added up to now. All files with these extensions are combined sequentially into the compound stream. After successful merge, the source are deleted.files. | |
| Public Member Functions inherited from Lucene::LuceneObject | |
| virtual | ~LuceneObject () |
| virtual void | initialize () |
| Called directly after instantiation to create objects that depend on this object being fully constructed. | |
| virtual LuceneObjectPtr | clone (const LuceneObjectPtr &other=LuceneObjectPtr()) |
| Return clone of this object. | |
| virtual int32_t | hashCode () |
| Return hash code for this object. | |
| virtual bool | equals (const LuceneObjectPtr &other) |
| Return whether two objects are equal. | |
| virtual int32_t | compareTo (const LuceneObjectPtr &other) |
| Compare two objects. | |
| virtual String | toString () |
| Returns a string representation of the object. | |
| Public Member Functions inherited from Lucene::LuceneSync | |
| virtual | ~LuceneSync () |
| virtual SynchronizePtr | getSync () |
| Return this object synchronize lock. | |
| virtual LuceneSignalPtr | getSignal () |
| Return this object signal. | |
| virtual void | lock (int32_t timeout=0) |
| Lock this object using an optional timeout. | |
| virtual void | unlock () |
| Unlock this object. | |
| virtual bool | holdsLock () |
| Returns true if this object is currently locked by current thread. | |
| virtual void | wait (int32_t timeout=0) |
| Wait for signal using an optional timeout. | |
| virtual void | notifyAll () |
| Notify all threads waiting for signal. | |
Static Public Member Functions | |
| static String | _getClassName () |
Protected Member Functions | |
| void | copyFile (const FileEntry &source, const IndexOutputPtr &os, ByteArray buffer) |
| Copy the contents of the file with specified extension into the provided output stream. Use the provided buffer for moving data to reduce memory allocation. | |
| Protected Member Functions inherited from Lucene::LuceneObject | |
| LuceneObject () | |
Protected Attributes | |
| DirectoryWeakPtr | _directory |
| String | fileName |
| HashSet< String > | ids |
| Collection< FileEntry > | entries |
| bool | merged |
| CheckAbortPtr | checkAbort |
| Protected Attributes inherited from Lucene::LuceneSync | |
| SynchronizePtr | objectLock |
| LuceneSignalPtr | objectSignal |
Combines multiple files into a single compound file. The file format: VInt fileCount {Directory} fileCount entries with the following structure: int64_t dataOffset String fileName {File Data} fileCount entries with the raw data of the corresponding file.
The fileCount integer indicates how many files are contained in this compound file. The {directory} that follows has that many entries. Each directory entry contains a long pointer to the start of this file's data section, and a string with that file's name.
| Lucene::CompoundFileWriter::CompoundFileWriter | ( | const DirectoryPtr & | dir, |
| const String & | name, | ||
| const CheckAbortPtr & | checkAbort = CheckAbortPtr() ) |
References checkAbort.
Referenced by _getClassName().
|
virtual |
|
inlinestatic |
References CompoundFileWriter().
| void Lucene::CompoundFileWriter::addFile | ( | const String & | file | ) |
Add a source stream. file is the string by which the sub-stream will be known in the compound stream.
| void Lucene::CompoundFileWriter::close | ( | ) |
Merge files with the extensions added up to now. All files with these extensions are combined sequentially into the compound stream. After successful merge, the source are deleted.files.
|
protected |
Copy the contents of the file with specified extension into the provided output stream. Use the provided buffer for moving data to reduce memory allocation.
|
inlinevirtual |
| DirectoryPtr Lucene::CompoundFileWriter::getDirectory | ( | ) |
Returns the directory of the compound file.
| String Lucene::CompoundFileWriter::getName | ( | ) |
Returns the name of the compound file.
|
inline |
|
protected |
|
protected |
Referenced by CompoundFileWriter().
|
protected |
|
protected |
|
protected |
|
protected |