DbEnv::rep_set_timeout
|
|
#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 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
- The which parameter must be set to one of the following values:
- DB_REP_ACK_TIMEOUT
- Configure the amount of time the replication manager's transport
function waits to collect enough acknowledgments from replication group
clients, before giving up and returning a failure indication. The
default wait time is 1 second.
- DB_REP_ELECTION_TIMEOUT
- The timeout period for an election. The default timeout is 2 seconds.
- DB_REP_ELECTION_RETRY
- Configure the amount of time the replication manager will wait before
retrying a failed election. The default wait time is 10 seconds.
- DB_REP_CONNECTION_RETRY
- Configure the amount of time the replication manager will wait before
trying to re-establish a connection to another site after a communication
failure. The default wait time is 30 seconds.
- timeout
- The timeout parameter is the timeout value. It must be specified
as an unsigned 32-bit number of microseconds, limiting the maximum timeout
to roughly 71 minutes.
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
- An
invalid flag value or parameter was specified.
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
- The which parameter is the timeout value for which the value
is being returned.
- timeoutp
- The timeoutp parameter references memory into which
the timeout value of the specified which parameter is copied. The returned timeout value is in microseconds.
Class
DbEnv
See Also
Replication and Related Methods
Copyright (c) 1996-2006 Oracle Corporation - All rights reserved.