Documentation Home
MySQL NDB Cluster API Developer Guide
Download this Manual

2.3.17.24 Ndb_cluster_connection::wait_until_ready()

Description.  This method is needed to establish connections with the data nodes. It waits until the requested connection with one or more data nodes is successful, or until a timeout condition is met.

Signature. 

int wait_until_ready
    (
      int timeoutBefore,
      int timeoutAfter
    )

Parameters.  This method takes two parameters:

  • timeoutBefore determines the number of seconds to wait until the first live node is detected. If this amount of time is exceeded with no live nodes detected, then the method immediately returns a negative value.

  • timeoutAfter determines the number of seconds to wait after the first live node is detected for all nodes to become active. If this amount of time is exceeded without all nodes becoming active, then the method immediately returns a value greater than zero.

Return value.  wait_until_ready() returns an int, whose value is interpreted as follows:

  • = 0: All nodes are live.

  • > 0: At least one node is live (however, it is not known whether all nodes are live).

  • < 0: An error occurred.


User Comments
Sign Up Login You must be logged in to post a comment.