ObjectStore C++ API Reference

os_failover_server

class os_failover_server : public os_server
This class is derived from os_server.

The types os_int32 and os_boolean, used throughout this manual, are each defined as a signed 32-bit integer type. The type os_unsigned_int32 is defined as an unsigned 32-bit integer type.

Programs using this class must include <ostore/ostore.hh>, followed by <ostore/coll.hh> (if collections are used).

See ObjectStore Management for more information on failover.

os_failover_server::get_logical_server_hostname()

char* get_logical_server_hostname() const;
Returns the logical name of a failover server. A failover server should always be referred to by its logical server name.

The caller should delete the returned value.

os_failover_server::get_online_server_hostname()

char* get_online_server_hostname() const;
Returns the name of the Server that the client is currently connected to, either the logical server, alternative server, or the empty string if there is no connection.

The caller should delete the returned value.

os_failover_server::get_reconnect_retry_interval()

os_unsigned_int32 get_reconnect_retry_interval() const;
Returns the reconnect retry interval, which determines how often to ping the Servers of a failover Server pair while attempting to reconnect to them.

os_failover_server::get_reconnect_timeout()

os_unsigned_int32 get_reconnect_timeout() const;
Returns the maximum amount of time that a client application attempts to reconnect to a broken failover Server connection.

When the timeout is reached, the following exception is raised: err_broken_failover_server_connection

os_failover_server::set_reconnect_timeout_and_interval()

os_boolean set_reconnect_timeout_and_interval(
      os_unsigned_int32 total_timeout_secs, 
      os_unsigned_int32 interval_secs);
Sets the total amount of time to try to reconnect a broken connection to a failover Server. The interval_secs argument is used to control how frequently the Servers of a failover Server pair are pinged to see if they are available.

Returns true if the function has reset these parameters with the given argument values.

If the parameters are invalid, the function returns false and does not change the reconnect timeout or reconnect retry interval.

Invalid parameters are those for which



[previous] [next]

Copyright © 1997 Object Design, Inc. All rights reserved.

Updated: 03/31/98 17:25:09