Ndb_cluster_connection Class Reference

#include <ndb_cluster_connection.hpp>

List of all members.


Detailed Description

Represents a connection to a cluster of storage nodes.

Any NDB application program should begin with the creation of a single Ndb_cluster_connection object, and should make use of one and only one Ndb_cluster_connection. The application connects to a cluster management server when this object's connect() method is called. By using the wait_until_ready() method it is possible to wait for the connection to reach one or more storage nodes.

Public Member Functions


Constructor & Destructor Documentation

Ndb_cluster_connection::Ndb_cluster_connection ( const char *  connectstring = 0  ) 

Create a connection to a cluster of storage nodes

Parameters:
connectstring The connectstring for where to find the management server


Member Function Documentation

void Ndb_cluster_connection::set_name ( const char *  name  ) 

Set a name on the connection, which will be reported in cluster log

Parameters:
name 

int Ndb_cluster_connection::connect ( int  no_retries = 0,
int  retry_delay_in_seconds = 1,
int  verbose = 0 
)

Connect to a cluster management server

Parameters:
no_retries specifies the number of retries to attempt in the event of connection failure; a negative value will result in the attempt to connect being repeated indefinitely
retry_delay_in_seconds specifies how often retries should be performed
verbose specifies if the method should print a report of its progess
Returns:
0 = success, 1 = recoverable error, -1 = non-recoverable error

int Ndb_cluster_connection::wait_until_ready ( int  timeout_for_first_alive,
int  timeout_after_first_alive 
)

Wait until the requested connection with one or more storage nodes is successful

Parameters:
timeout_for_first_alive Number of seconds to wait until first live node is detected
timeout_after_first_alive Number of seconds to wait after first live node is detected
Returns:
= 0 all nodes live, > 0 at least one node live, < 0 error


Documentation generated Fri Sep 28 07:32:30 2007 from mysql source files.
© 2003-2004 MySQL AB