aitools::invertedindex::StorageBuilder Class Reference

#include <StorageBuilder.hpp>

List of all members.

Public Types

typedef std::pair< uint16_t,
uint32_t > 
Location

Public Member Functions

 StorageBuilder ()
 ~StorageBuilder ()
bool is_open () const
const bfs::path & directory () const
void close () throw (std::invalid_argument)
void open (const bfs::path &directory) throw (std::invalid_argument)
void put (const std::string &key, Iterator::SharedPointer iterator) throw (std::runtime_error)
void put (const std::string &key, const Quantile &quantile) throw (std::runtime_error)
const Vocabularyvocabulary () const

Static Public Attributes

static const std::string data_file
static const std::string mphf_file
static const std::string vocab_file
static const std::string storage_file
static const std::string quantile_file
static const size_t max_file_size = 1024 * 1024 * 1024

Private Types

typedef
PostlistWriter::SharedPointer 
Writer
typedef
std::tr1::unordered_map
< std::string, Location
LocationMap
typedef
std::tr1::unordered_map
< std::string, Quantile
QuantileMap
typedef std::vector< WriterWriterVector

Private Attributes

bfs::path directory_
Vocabulary vocabulary_
LocationMap locations_
QuantileMap quantiles_
WriterVector writers_

Detailed Description

A class to write postlists to an external storage device.

Author:
martin.trenkmann@uni-weimar.de

Created on Jun 22, 2008

Id
StorageBuilder.hpp,v 1.6 2010/05/11 23:41:08 trenkman Exp

Definition at line 27 of file StorageBuilder.hpp.


Member Typedef Documentation

typedef std::pair<uint16_t, uint32_t> aitools::invertedindex::StorageBuilder::Location

Defines a pair of file id and file offset.

Definition at line 34 of file StorageBuilder.hpp.

typedef std::tr1::unordered_map<std::string, Location> aitools::invertedindex::StorageBuilder::LocationMap [private]

Definition at line 39 of file StorageBuilder.hpp.

typedef std::tr1::unordered_map<std::string, Quantile> aitools::invertedindex::StorageBuilder::QuantileMap [private]

Definition at line 40 of file StorageBuilder.hpp.

Definition at line 38 of file StorageBuilder.hpp.

Definition at line 41 of file StorageBuilder.hpp.


Constructor & Destructor Documentation

aitools::invertedindex::StorageBuilder::StorageBuilder (  ) 

Definition at line 25 of file StorageBuilder.cpp.

aitools::invertedindex::StorageBuilder::~StorageBuilder (  ) 

Definition at line 28 of file StorageBuilder.cpp.

References close().

Here is the call graph for this function:


Member Function Documentation

void aitools::invertedindex::StorageBuilder::close (  )  throw (std::invalid_argument)
const bfs::path & aitools::invertedindex::StorageBuilder::directory (  )  const

Definition at line 40 of file StorageBuilder.cpp.

References directory_.

bool aitools::invertedindex::StorageBuilder::is_open (  )  const

Definition at line 34 of file StorageBuilder.cpp.

References directory_.

Referenced by close().

Here is the caller graph for this function:

void aitools::invertedindex::StorageBuilder::open ( const bfs::path &  directory  )  throw (std::invalid_argument)

Definition at line 86 of file StorageBuilder.cpp.

References aitools::invertedindex::Exception::throw_invalid_argument().

Here is the call graph for this function:

void aitools::invertedindex::StorageBuilder::put ( const std::string &  key,
const Quantile quantile 
) throw (std::runtime_error)

Definition at line 129 of file StorageBuilder.cpp.

References aitools::invertedindex::Exception::throw_runtime_error().

Here is the call graph for this function:

void aitools::invertedindex::StorageBuilder::put ( const std::string &  key,
Iterator::SharedPointer  iterator 
) throw (std::runtime_error)
const Vocabulary & aitools::invertedindex::StorageBuilder::vocabulary (  )  const

Definition at line 144 of file StorageBuilder.cpp.

References vocabulary_.


Member Data Documentation

Definition at line 45 of file StorageBuilder.hpp.

Referenced by aitools::invertedindex::StorageSearcher::open().

Definition at line 79 of file StorageBuilder.hpp.

Referenced by close(), directory(), and is_open().

Definition at line 81 of file StorageBuilder.hpp.

Referenced by close().

const size_t aitools::invertedindex::StorageBuilder::max_file_size = 1024 * 1024 * 1024 [static]

Definition at line 51 of file StorageBuilder.hpp.

Definition at line 46 of file StorageBuilder.hpp.

Referenced by close(), and aitools::invertedindex::StorageSearcher::open().

Definition at line 49 of file StorageBuilder.hpp.

Referenced by close(), and aitools::invertedindex::StorageSearcher::open().

Definition at line 82 of file StorageBuilder.hpp.

Referenced by close().

Definition at line 48 of file StorageBuilder.hpp.

Referenced by close(), and aitools::invertedindex::StorageSearcher::open().

Definition at line 47 of file StorageBuilder.hpp.

Referenced by close(), and aitools::invertedindex::StorageSearcher::open().

Definition at line 80 of file StorageBuilder.hpp.

Referenced by close(), and vocabulary().

Definition at line 83 of file StorageBuilder.hpp.

Referenced by close().


The documentation for this class was generated from the following files:
Generated on Wed May 30 15:07:35 2012 by  doxygen 1.6.3