xapian-core  1.4.27
Functions
Xapian::Remote Namespace Reference

Database factory functions for the remote backend. More...

Functions

Database open (const std::string &host, unsigned int port, useconds_t timeout=10000, useconds_t connect_timeout=10000)
 Construct a Database object for read-only access to a remote database accessed via a TCP connection. More...
 
WritableDatabase open_writable (const std::string &host, unsigned int port, useconds_t timeout=0, useconds_t connect_timeout=10000, int flags=0)
 Construct a WritableDatabase object for update access to a remote database accessed via a TCP connection. More...
 
Database open (const std::string &program, const std::string &args, useconds_t timeout=10000)
 Construct a Database object for read-only access to a remote database accessed via a program. More...
 
WritableDatabase open_writable (const std::string &program, const std::string &args, useconds_t timeout=0, int flags=0)
 Construct a WritableDatabase object for update access to a remote database accessed via a program. More...
 

Detailed Description

Database factory functions for the remote backend.

Function Documentation

◆ open() [1/2]

Database Xapian::Remote::open ( const std::string &  host,
unsigned int  port,
useconds_t  timeout = 10000,
useconds_t  connect_timeout = 10000 
)

Construct a Database object for read-only access to a remote database accessed via a TCP connection.

Access to the remote database is via a TCP connection to the specified host and port.

Parameters
hosthostname to connect to.
portport number to connect to.
timeouttimeout in milliseconds. If this timeout is exceeded for any individual operation on the remote database then Xapian::NetworkTimeoutError is thrown. A timeout of 0 means don't timeout. (Default is 10000ms, which is 10 seconds).
connect_timeouttimeout to use when connecting to the server. If this timeout is exceeded then Xapian::NetworkTimeoutError is thrown. A timeout of 0 means don't timeout. (Default is 10000ms, which is 10 seconds).

Definition at line 42 of file dbfactory_remote.cc.

References LOGCALL_STATIC, and RETURN.

Referenced by BackendManagerRemoteTcp::get_database_by_path(), BackendManagerRemoteProg::get_database_by_path(), BackendManagerRemoteTcp::get_remote_database(), BackendManagerRemoteProg::get_remote_database(), BackendManagerRemoteTcp::get_writable_database_as_database(), and BackendManagerRemoteProg::get_writable_database_as_database().

◆ open() [2/2]

Database Xapian::Remote::open ( const std::string &  program,
const std::string &  args,
useconds_t  timeout = 10000 
)

Construct a Database object for read-only access to a remote database accessed via a program.

Access to the remote database is done by running an external program and communicating with it on stdin/stdout.

Parameters
programthe external program to run.
argsspace-separated list of arguments to pass to program.
timeouttimeout in milliseconds. If this timeout is exceeded for any individual operation on the remote database then Xapian::NetworkTimeoutError is thrown. A timeout of 0 means don't timeout. (Default is 10000ms, which is 10 seconds).

Definition at line 62 of file dbfactory_remote.cc.

References LOGCALL_STATIC, and RETURN.

Referenced by Xapian::InMemory::open(), Xapian::Chert::open(), and Xapian::Auto::open_stub().

◆ open_writable() [1/2]

WritableDatabase Xapian::Remote::open_writable ( const std::string &  host,
unsigned int  port,
useconds_t  timeout = 0,
useconds_t  connect_timeout = 10000,
int  flags = 0 
)

Construct a WritableDatabase object for update access to a remote database accessed via a TCP connection.

Access to the remote database is via a TCP connection to the specified host and port.

Parameters
hosthostname to connect to.
portport number to connect to.
timeouttimeout in milliseconds. If this timeout is exceeded for any individual operation on the remote database then Xapian::NetworkTimeoutError is thrown. (Default is 0, which means don't timeout).
connect_timeouttimeout to use when connecting to the server. If this timeout is exceeded then Xapian::NetworkTimeoutError is thrown. A timeout of 0 means don't timeout. (Default is 10000ms, which is 10 seconds).
flagsXapian::DB_RETRY_LOCK or 0.

Definition at line 51 of file dbfactory_remote.cc.

References LOGCALL_STATIC, and RETURN.

Referenced by BackendManagerRemoteProg::get_remote_writable_database(), BackendManagerRemoteTcp::get_writable_database(), BackendManagerRemoteProg::get_writable_database(), BackendManagerRemoteTcp::get_writable_database_again(), BackendManagerRemoteProg::get_writable_database_again(), and Xapian::open_stub().

◆ open_writable() [2/2]

WritableDatabase Xapian::Remote::open_writable ( const std::string &  program,
const std::string &  args,
useconds_t  timeout = 0,
int  flags = 0 
)

Construct a WritableDatabase object for update access to a remote database accessed via a program.

Access to the remote database is done by running an external program and communicating with it on stdin/stdout.

Parameters
programthe external program to run.
argsspace-separated list of arguments to pass to program.
timeouttimeout in milliseconds. If this timeout is exceeded for any individual operation on the remote database then Xapian::NetworkTimeoutError is thrown. (Default is 0, which means don't timeout).
flagsXapian::DB_RETRY_LOCK or 0.

Definition at line 70 of file dbfactory_remote.cc.

References LOGCALL_STATIC, and RETURN.

Referenced by Xapian::Chert::open().