xapian-core  1.4.26
Public Member Functions | Private Member Functions | Private Attributes | List of all members
BackendManagerRemoteTcp Class Reference

BackendManager subclass for remotetcp databases. More...

#include <backendmanager_remotetcp.h>

+ Inheritance diagram for BackendManagerRemoteTcp:
+ Collaboration diagram for BackendManagerRemoteTcp:

Public Member Functions

 BackendManagerRemoteTcp (BackendManager *sub_manager_)
 
 ~BackendManagerRemoteTcp ()
 
Xapian::WritableDatabase get_writable_database (const std::string &name, const std::string &file)
 Create a RemoteTcp Xapian::WritableDatabase object indexing a single file. More...
 
Xapian::Database get_remote_database (const std::vector< std::string > &files, unsigned int timeout)
 Create a RemoteTcp Xapian::Database with the specified timeout. More...
 
Xapian::Database get_database_by_path (const std::string &path)
 Get a RemoteTcp Xapian::Database instance of the database at path. More...
 
Xapian::Database get_writable_database_as_database ()
 Create a Database object for the last opened WritableDatabase. More...
 
Xapian::WritableDatabase get_writable_database_again ()
 Create a WritableDatabase object for the last opened WritableDatabase. More...
 
void clean_up ()
 Called after each test, to perform any necessary cleanup. More...
 
- Public Member Functions inherited from BackendManagerRemote
 BackendManagerRemote (BackendManager *sub_manager_, const std::string &dbtype_)
 
std::string get_writable_database_args (const std::string &name, const std::string &file)
 Get the args for opening a remote database indexing a single file. More...
 
std::string get_writable_database_args (const std::string &path, unsigned int timeout)
 Get the args for opening a writable remote database with the specified timeout. More...
 
std::string get_remote_database_args (const std::vector< std::string > &files, unsigned int timeout)
 Get the args for opening a remote database with the specified timeout. More...
 
std::string get_remote_database_args (const std::string &name, unsigned int timeout)
 Get the args for opening a remote database with the specified timeout. More...
 
std::string get_writable_database_as_database_args ()
 Get the args for opening the last opened WritableDatabase. More...
 
std::string get_writable_database_again_args ()
 Get the args for opening the last opened WritableDatabase again. More...
 
std::string get_generated_database_path (const std::string &name)
 Get generated database path from sub_manager. More...
 
Xapian::WritableDatabase get_generated_database (const std::string &name)
 Get generated database. More...
 
- Public Member Functions inherited from BackendManager
 BackendManager (const std::string &datadir_, const std::string &dbtype_)
 Constructor. More...
 
virtual ~BackendManager ()
 We have virtual methods and want to be able to delete derived classes using a pointer to the base class, so we need a virtual destructor. More...
 
const std::string & get_dbtype () const
 Get the database type currently in use. More...
 
const std::string & get_datadir () const
 Get the directory to store data in. More...
 
Xapian::Database get_database (const std::vector< std::string > &files)
 Get a database instance of the current type. More...
 
Xapian::Database get_database (const std::string &file)
 Get a database instance of the current type, single file case. More...
 
Xapian::Database get_database (const std::string &dbname, void(*gen)(Xapian::WritableDatabase &, const std::string &), const std::string &arg)
 Get a database instance of the current type, generated case. More...
 
std::string get_database_path (const std::vector< std::string > &files)
 Get the path of a database instance, if such a thing exists. More...
 
std::string get_database_path (const std::string &file)
 Get the path of a database instance, if such a thing exists (single file case). More...
 
std::string get_database_path (const std::string &dbname, void(*gen)(Xapian::WritableDatabase &, const std::string &), const std::string &arg)
 Get the path of a generated database instance. More...
 
virtual Xapian::WritableDatabase get_remote_writable_database (std::string args)
 Get a remote Xapian::WritableDatabase instance with specified args. More...
 
virtual std::string get_writable_database_path (const std::string &name)
 Get the path of a writable database instance, if such a thing exists. More...
 
virtual void finalise_generated_database (const std::string &name)
 Finalise the generated database. More...
 
virtual std::string get_writable_database_path_again ()
 Get the path of the last opened WritableDatabase. More...
 
virtual std::string get_compaction_output_path (const std::string &name)
 Get a path to compact a database to. More...
 

Private Member Functions

void operator= (const BackendManagerRemoteTcp &)
 Don't allow assignment. More...
 
 BackendManagerRemoteTcp (const BackendManagerRemoteTcp &)
 Don't allow copying. More...
 
Xapian::Database do_get_database (const std::vector< std::string > &files)
 Create a Xapian::Database object indexing multiple files. More...
 

Private Attributes

std::string last_wdb_name
 The path of the last writable database used. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from BackendManager
static const char * get_xapian_progsrv_command ()
 Get the command line required to run xapian-progsrv. More...
 
- Protected Member Functions inherited from BackendManager
void index_files_to_database (Xapian::WritableDatabase &database, const std::vector< std::string > &files)
 Index data from zero or more text files into a database. More...
 
bool create_dir_if_needed (const std::string &dirname)
 Create the directory dirname if needed. More...
 
virtual std::string do_get_database_path (const std::vector< std::string > &files)
 Virtual method implementing get_database_path(). More...
 
- Protected Attributes inherited from BackendManagerRemote
BackendManagersub_manager
 

Detailed Description

BackendManager subclass for remotetcp databases.

Definition at line 31 of file backendmanager_remotetcp.h.

Constructor & Destructor Documentation

◆ BackendManagerRemoteTcp() [1/2]

BackendManagerRemoteTcp::BackendManagerRemoteTcp ( const BackendManagerRemoteTcp )
private

Don't allow copying.

◆ BackendManagerRemoteTcp() [2/2]

BackendManagerRemoteTcp::BackendManagerRemoteTcp ( BackendManager sub_manager_)
inlineexplicit

◆ ~BackendManagerRemoteTcp()

BackendManagerRemoteTcp::~BackendManagerRemoteTcp ( )

Definition at line 349 of file backendmanager_remotetcp.cc.

References clean_up().

Referenced by BackendManagerRemoteTcp().

Member Function Documentation

◆ clean_up()

void BackendManagerRemoteTcp::clean_up ( )
virtual

Called after each test, to perform any necessary cleanup.

Reimplemented from BackendManager.

Definition at line 404 of file backendmanager_remotetcp.cc.

References close().

Referenced by BackendManagerRemoteTcp(), and ~BackendManagerRemoteTcp().

◆ do_get_database()

Xapian::Database BackendManagerRemoteTcp::do_get_database ( const std::vector< std::string > &  files)
privatevirtual

Create a Xapian::Database object indexing multiple files.

Reimplemented from BackendManager.

Definition at line 354 of file backendmanager_remotetcp.cc.

References get_remote_database().

◆ get_database_by_path()

Xapian::Database BackendManagerRemoteTcp::get_database_by_path ( const std::string &  path)
virtual

Get a RemoteTcp Xapian::Database instance of the database at path.

Reimplemented from BackendManager.

Definition at line 380 of file backendmanager_remotetcp.cc.

References LOCALHOST, and Xapian::Remote::open().

Referenced by BackendManagerRemoteTcp().

◆ get_remote_database()

Xapian::Database BackendManagerRemoteTcp::get_remote_database ( const std::vector< std::string > &  files,
unsigned int  timeout 
)
virtual

Create a RemoteTcp Xapian::Database with the specified timeout.

Reimplemented from BackendManager.

Definition at line 371 of file backendmanager_remotetcp.cc.

References LOCALHOST, and Xapian::Remote::open().

Referenced by BackendManagerRemoteTcp(), and do_get_database().

◆ get_writable_database()

Xapian::WritableDatabase BackendManagerRemoteTcp::get_writable_database ( const std::string &  name,
const std::string &  file 
)
virtual

Create a RemoteTcp Xapian::WritableDatabase object indexing a single file.

Reimplemented from BackendManager.

Definition at line 362 of file backendmanager_remotetcp.cc.

References LOCALHOST, and Xapian::Remote::open_writable().

Referenced by BackendManagerRemoteTcp().

◆ get_writable_database_again()

Xapian::WritableDatabase BackendManagerRemoteTcp::get_writable_database_again ( )
virtual

Create a WritableDatabase object for the last opened WritableDatabase.

Reimplemented from BackendManager.

Definition at line 396 of file backendmanager_remotetcp.cc.

References LOCALHOST, and Xapian::Remote::open_writable().

Referenced by BackendManagerRemoteTcp().

◆ get_writable_database_as_database()

Xapian::Database BackendManagerRemoteTcp::get_writable_database_as_database ( )
virtual

Create a Database object for the last opened WritableDatabase.

Reimplemented from BackendManager.

Definition at line 388 of file backendmanager_remotetcp.cc.

References LOCALHOST, and Xapian::Remote::open().

Referenced by BackendManagerRemoteTcp().

◆ operator=()

void BackendManagerRemoteTcp::operator= ( const BackendManagerRemoteTcp )
private

Don't allow assignment.

Member Data Documentation

◆ last_wdb_name

std::string BackendManagerRemoteTcp::last_wdb_name
private

The path of the last writable database used.

Definition at line 39 of file backendmanager_remotetcp.h.


The documentation for this class was generated from the following files: