Description. This method waits until the requested connection with one or more data nodes is successful.
int wait_until_ready ( int timeoutBefore, int timeoutAfter )
Parameters. This method takes two parameters:
timeoutBeforedetermines 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.
timeoutAfterdetermines 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.
If this method returns
0, then all nodes are
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.