#include <NdbEventOperation.hpp>
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
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
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
void NdbEventOperation::mergeEvents | ( | bool | flag | ) |
See NdbDictionary::Event. Default is false.
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