#include <NdbEventOperation.hpp>
Public Types | |
| enum | State { EO_CREATED, EO_EXECUTING, EO_DROPPED, EO_ERROR } |
Public Member Functions | |
| State | getState () |
| void | mergeEvents (bool flag) |
| int | execute () |
| NdbRecAttr * | getValue (const char *anAttrName, char *aValue=0) |
| NdbRecAttr * | getPreValue (const char *anAttrName, char *aValue=0) |
| NdbBlob * | getBlobHandle (const char *anAttrName) |
| NdbBlob * | getPreBlobHandle (const char *anAttrName) |
| int | isOverrun () const |
| bool | isConsistent () const |
| NdbDictionary::Event::TableEvent | getEventType () const |
| const bool | tableNameChanged () const |
| const bool | tableFrmChanged () const |
| const bool | tableFragmentationChanged () const |
| const bool | tableRangeListChanged () const |
| Uint64 | getGCI () const |
| Uint32 | getAnyValue () const |
| Uint64 | getLatestGCI () const |
| struct NdbError & | getNdbError () const |
Private Member Functions | |
| NdbEventOperation (Ndb *theNdb, const char *eventName) | |
| ~NdbEventOperation () | |
| NdbEventOperation (NdbEventOperationImpl &impl) | |
| NdbEventOperation (const NdbEventOperation &) | |
| NdbEventOperation & | operator= (const NdbEventOperation &) |
Private Attributes | |
| class NdbEventOperationImpl & | m_impl |
Brief description on how to work with events:
For more info see: ndbapi_event.cpp
Known limitations:
Known issues:
Test status:
Useful API programs:
State of the NdbEventOperation object
| NdbEventOperation::NdbEventOperation | ( | Ndb * | theNdb, | |
| const char * | eventName | |||
| ) | [private] |
| NdbEventOperation::~NdbEventOperation | ( | ) | [private] |
| NdbEventOperation::NdbEventOperation | ( | NdbEventOperationImpl & | impl | ) | [private] |
| NdbEventOperation::NdbEventOperation | ( | const NdbEventOperation & | ) | [private] |
| int NdbEventOperation::execute | ( | ) |
Activates the NdbEventOperation to start receiving events. The changed attribute values may be retrieved after Ndb::nextEvent() has returned not NULL. The getValue() methods must be called prior to execute().
| Uint32 NdbEventOperation::getAnyValue | ( | ) | const |
Retrieve the AnyValue of the latest retrieved event
| NdbBlob* NdbEventOperation::getBlobHandle | ( | const char * | anAttrName | ) |
| NdbDictionary::Event::TableEvent NdbEventOperation::getEventType | ( | ) | const |
Query for occured event type.
| Uint64 NdbEventOperation::getGCI | ( | ) | const |
Retrieve the GCI of the latest retrieved event
| Uint64 NdbEventOperation::getLatestGCI | ( | ) | const |
Retrieve the complete GCI in the cluster (not necessarily associated with an event)
| struct NdbError& NdbEventOperation::getNdbError | ( | ) | const [read] |
Get the latest error
| NdbBlob* NdbEventOperation::getPreBlobHandle | ( | const char * | anAttrName | ) |
| NdbRecAttr* NdbEventOperation::getPreValue | ( | const char * | anAttrName, | |
| char * | aValue = 0 | |||
| ) |
See getValue().
| State NdbEventOperation::getState | ( | ) |
Retrieve current state of the NdbEventOperation object
| NdbRecAttr* NdbEventOperation::getValue | ( | const char * | anAttrName, | |
| char * | aValue = 0 | |||
| ) |
Defines a retrieval operation of an attribute value. The NDB API allocate memory for the NdbRecAttr object that will hold the returned attribute value.
There are two versions, getValue() and getPreValue() for retrieving the current and previous value repectively.
This method does not fetch the attribute value from the database! The NdbRecAttr object returned by this method is not readable/printable before the execute() has been made and Ndb::nextEvent() has returned not NULL. If a specific attribute has not changed the corresponding NdbRecAttr will be in state UNDEFINED. This is checked by NdbRecAttr::isNULL() which then returns -1.
| anAttrName | Attribute name | |
| aValue | If this is non-NULL, then the attribute value will be returned in this parameter. If NULL, then the attribute value will only be stored in the returned NdbRecAttr object. |
| bool NdbEventOperation::isConsistent | ( | ) | const |
In the current implementation a nodefailiure may cause loss of events, in which case isConsistent() will return false
| int NdbEventOperation::isOverrun | ( | ) | const |
| void NdbEventOperation::mergeEvents | ( | bool | flag | ) |
See NdbDictionary::Event. Default is false.
| NdbEventOperation& NdbEventOperation::operator= | ( | const NdbEventOperation & | ) | [private] |
| const bool NdbEventOperation::tableFragmentationChanged | ( | ) | const |
Check if table fragmentation has changed, for event TE_ALTER
| const bool NdbEventOperation::tableFrmChanged | ( | ) | const |
Check if table frm has changed, for event TE_ALTER
| const bool NdbEventOperation::tableNameChanged | ( | ) | const |
Check if table name has changed, for event TE_ALTER
| const bool NdbEventOperation::tableRangeListChanged | ( | ) | const |
Check if table range partition list name has changed, for event TE_ALTER
class NdbEventOperationImpl& NdbEventOperation::m_impl [private] |
Based on MySQL Cluster 7.0.7.
This page is for information only and is not maintained by MySQL or Sun Microsystems - use at your own risk. For an upto date view of the API refer to the header files included with your MySQL Cluster distribution or check the MySQL Cluster API Developer Guide.