Documentation Home
MySQL NDB Cluster API Developer Guide
Download this Manual

2.3.16.26 Ndb::nextEvent2()

Description.  Returns the event operation associated with the data dequeued from the event queue. This should be called repeatedly after pollEvents2() populates the queue, until the event queue is empty.

Added in NDB 7.4.3, this method supersedes nextEvent(), which is now deprecated and subject to removal in a future NDB Cluster release.

After calling this method, use NdbEventOperation::getEpoch() to determine the epoch, then check the type of the returned event data using NdbEventOperation::getEventType2(). Handling must be provided for all exceptional TableEvent types, including TE_EMPTY, TE_INCONSISTENT, and TE_OUT_OF_MEMORY (also introduced in NDB 7.4.3). No other NdbEventOperation methods than the two named here should be called for an exceptional epoch. Returning empty epochs (TE_EMPTY) may flood applications when data nodes are idle. If this is not desirable, applications should filter out any empty epochs.

Signature. 

NdbEventOperation* nextEvent2
    (
      void
    )

Parameters.  None.

Return value.  This method returns an NdbEventOperation object representing the next event in an event queue, if there is such an event. If there is no event in the queue, it returns NULL instead.


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