DbEnv::rep_set_timeout API Ref

#include <db_cxx.h>

int DbEnv::rep_set_timeout(int which, u_int32_t timeout);

int DbEnv::rep_get_timeout(int which, u_int32_t *timeoutp);


Description: DbEnv::rep_set_timeout

The DbEnv::rep_set_timeout method specifies a variety of replication timeout values.

The database environment's replication subsystem may also be configured using the environment's DB_CONFIG file. The syntax of the entry in that file is a single line with the string "rep_set_timeout", one or more whitespace characters, and the which parameter specified as a string and the timeout specified as two parts. For example, "rep_set_timeout DB_REP_CONNECTION_RETRY 15000000" specifies the connection retry timeout for 15 seconds. Because the DB_CONFIG file is read when the database environment is opened, it will silently overrule configuration done before that time.

The DbEnv::rep_set_timeout method configures a database environment, not only operations performed using the specified DbEnv handle.

The DbEnv::rep_set_timeout method may be called at any time during the life of the application.

The DbEnv::rep_set_timeout method either returns a non-zero error value or throws an exception that encapsulates a non-zero error value on failure, and returns 0 on success.

Parameters
which

Errors

The DbEnv::rep_set_timeout method may fail and throw DbException, encapsulating one of the following non-zero errors, or return one of the following non-zero errors:


EINVAL

Description: DbEnv::rep_get_timeout

The DbEnv::rep_get_timeout method returns the timeout value for the specified which parameter.

The DbEnv::rep_get_timeout method may be called at any time during the life of the application.

The DbEnv::rep_get_timeout method either returns a non-zero error value or throws an exception that encapsulates a non-zero error value on failure, and returns 0 on success.

Parameters
which timeoutp The returned timeout value is in microseconds.


Class DbEnv
See Also Replication and Related Methods

APIRef

Copyright (c) 1996,2008 Oracle. All rights reserved.