MySQL 5.6.14 Source Code Document
|
Class of operations for getting change events from database. More...
#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 |
bool | tableNameChanged () const |
bool | tableFrmChanged () const |
bool | tableFragmentationChanged () const |
bool | tableRangeListChanged () const |
Uint64 | getGCI () const |
Uint32 | getAnyValue () const |
Uint64 | getLatestGCI () const |
Uint64 | getTransId () const |
struct NdbError & | getNdbError () const |
const NdbDictionary::Table * | getTable () const |
const NdbDictionary::Event * | getEvent () const |
const NdbRecAttr * | getFirstPkAttr () const |
const NdbRecAttr * | getFirstPkPreAttr () const |
const NdbRecAttr * | getFirstDataAttr () const |
const NdbRecAttr * | getFirstDataPreAttr () const |
void | setCustomData (void *data) |
void * | getCustomData () const |
void | clearError () |
int | hasError () const |
int | getReqNodeId () const |
int | getNdbdNodeId () const |
void | print () |
Friends | |
class | NdbEventOperationImpl |
class | NdbEventBuffer |
Class of operations for getting change events from database.
Brief description on how to work with events:
For more info see: ndbapi_event.cpp
Known limitations:
Known issues:
Test status:
Useful API programs:
Definition at line 83 of file NdbEventOperation.hpp.
State of the NdbEventOperation object
EO_CREATED |
Created but execute() not called. |
EO_EXECUTING |
execute() called |
EO_DROPPED |
Waiting to be deleted, Object unusable. |
EO_ERROR |
An error has occurred. Object unusable. |
Definition at line 88 of file NdbEventOperation.hpp.
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().
Reimplemented in NdbEventOperationImpl.
Definition at line 73 of file NdbEventOperation.cpp.
Uint32 NdbEventOperation::getAnyValue | ( | ) | const |
Retrieve the AnyValue of the latest retrieved event
Reimplemented in NdbEventOperationImpl.
Definition at line 129 of file NdbEventOperation.cpp.
NdbBlob * NdbEventOperation::getBlobHandle | ( | const char * | anAttrName | ) |
These methods replace getValue/getPreValue for blobs. Each method creates a blob handle NdbBlob. The handle supports only read operations. See NdbBlob.
Definition at line 61 of file NdbEventOperation.cpp.
NdbDictionary::Event::TableEvent NdbEventOperation::getEventType | ( | ) | const |
Query for occured event type.
Definition at line 147 of file NdbEventOperation.cpp.
Uint64 NdbEventOperation::getGCI | ( | ) | const |
Retrieve the GCI of the latest retrieved event
Definition at line 123 of file NdbEventOperation.cpp.
Uint64 NdbEventOperation::getLatestGCI | ( | ) | const |
Retrieve the complete GCI in the cluster (not necessarily associated with an event)
Definition at line 135 of file NdbEventOperation.cpp.
|
read |
Get the latest error
Reimplemented in NdbEventOperationImpl.
Definition at line 225 of file NdbEventOperation.cpp.
NdbRecAttr * NdbEventOperation::getPreValue | ( | const char * | anAttrName, |
char * | aValue = 0 |
||
) |
See getValue().
Definition at line 55 of file NdbEventOperation.cpp.
NdbEventOperation::State NdbEventOperation::getState | ( | ) |
Retrieve current state of the NdbEventOperation object
Reimplemented in NdbEventOperationImpl.
Definition at line 38 of file NdbEventOperation.cpp.
const NdbDictionary::Table * NdbEventOperation::getTable | ( | ) | const |
these are subject to change at any time
Definition at line 161 of file NdbEventOperation.cpp.
Uint64 NdbEventOperation::getTransId | ( | ) | const |
Retrieve the TransId of the latest retrieved event
Only valid for data events. If the kernel does not support transaction ids with events, the max Uint64 value is returned.
Reimplemented in NdbEventOperationImpl.
Definition at line 141 of file NdbEventOperation.cpp.
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.
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. |
Definition at line 49 of file NdbEventOperation.cpp.
bool NdbEventOperation::isConsistent | ( | ) | const |
In the current implementation a nodefailiure may cause loss of events, in which case isConsistent() will return false
Definition at line 85 of file NdbEventOperation.cpp.
void NdbEventOperation::mergeEvents | ( | bool | flag | ) |
See NdbDictionary::Event. Default is false.
Definition at line 43 of file NdbEventOperation.cpp.
bool NdbEventOperation::tableFragmentationChanged | ( | ) | const |
Check if table fragmentation has changed, for event TE_ALTER
Reimplemented in NdbEventOperationImpl.
Definition at line 112 of file NdbEventOperation.cpp.
bool NdbEventOperation::tableFrmChanged | ( | ) | const |
Check if table frm has changed, for event TE_ALTER
Reimplemented in NdbEventOperationImpl.
Definition at line 107 of file NdbEventOperation.cpp.
bool NdbEventOperation::tableNameChanged | ( | ) | const |
Check if table name has changed, for event TE_ALTER
Reimplemented in NdbEventOperationImpl.
Definition at line 102 of file NdbEventOperation.cpp.
bool NdbEventOperation::tableRangeListChanged | ( | ) | const |
Check if table range partition list name has changed, for event TE_ALTER
Reimplemented in NdbEventOperationImpl.
Definition at line 117 of file NdbEventOperation.cpp.