From: jon Date: June 30 2006 5:13am Subject: svn commit - mysqldoc@docsrva: r2554 - trunk/ndbapi List-Archive: http://lists.mysql.com/commits/8533 Message-Id: <200606300513.k5U5DejV018899@docsrva.mysql.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Author: jstephens Date: 2006-06-30 07:13:36 +0200 (Fri, 30 Jun 2006) New Revision: 2554 Log: NdbEventOperation method descriptions. Modified: trunk/ndbapi/ndb-classes.xml Modified: trunk/ndbapi/ndb-classes.xml =================================================================== --- trunk/ndbapi/ndb-classes.xml 2006-06-30 04:58:31 UTC (rev 2553) +++ trunk/ndbapi/ndb-classes.xml 2006-06-30 05:13:36 UTC (rev 2554) @@ -22400,7 +22400,7 @@ - We intend to fix these issues in future releases of MySQL + We intend to remedy these issues in future releases of MySQL Cluster and the NDB API. @@ -22486,7 +22486,7 @@ isOverrun() - --> +--> isConsistent() Detects event loss caused by node failure @@ -22612,11 +22612,8 @@ A State value is returned by the getState() method. See - NdbEventOperation::getState() - - - - , for more information. + , for more + information. @@ -22637,6 +22634,1236 @@ +
+ + <literal>NdbEventOperation::getState()</literal> + + + + Description + + + This method gets the event operation's current state. + + + + + + + Signature + + + +State getState + ( + void + ) + + + + + + + + Parameters + + + None. + + + + + + + Return Value + + + A State value. See + . + + + + + + + Example + + + +[To be supplied...] + + + + + +
+ +
+ + <literal>NdbEventOperation::getEventType()</literal> + + + + Description + + + This method is used to obtain the event's type + (TableEvent). + + + + + + + Signature + + + +NdbDictionary::Event::TableEvent getEventType + ( + void + ) const + + + + + + + + Parameters + + + None. + + + + + + + Return Value + + + A TableEvent value. See + . + + + + + + + Example + + + +[To be supplied...] + + + + + +
+ +
+ + <literal>NdbEventOperation::getValue()</literal> + + + + Description + + + This method defines the retrieval of an attribute value. The + NDB API allocates memory for the + NdbRecAttr object that is to hold the + returned attribute value. + + + + + + + This method does not fetch the + attribute value from the database, and the + NdbRecAttr object returned by this method + is not readable or printable before calling the execute() + method and Ndb::nextEvent() has returned + not NULL. + + + + If a specific attribute has not changed, the corresponding + NdbRecAttr will be in the state + UNDEFINED. This can be checked by using + NdbRecAttr::isNULL() which in such cases + returns -1. + + + + + + <replaceable>value</replaceable> Buffer Memory Allocation + + + It is the application's responsibility to allocate + sufficient memory for the value + buffer (if not NULL), and this buffer + must be aligned appropriately. The buffer is used directly + (thus avoiding a copy penalty) only if it is aligned on a + 4-byte boundary and the attribute size in bytes (calculated + as NdbRecAttr::attrSize() times + NdbRecAttr::arraySize()) is a multiple of + 4. + + + + + + + getValue() retrieves the current value. + Use getPreValue() for retrieving the + previous value. See + . + + + + + + Signature + + + +NdbRecAttr* getValue + ( + const char* name, + char* value = 0 + ) + + + + + + + + Parameters + + + This method takes two parameters: + + + + + + The name of the attribute + (as a constant character pointer). + + + + + + A pointer to a value: + + + + + + If the attribute value is not + NULL, then the attribute + value is returned in this parameter. + + + + + + If the attribute value is + NULL, then the attribute + value is stored only in the + NdbRecAttr object returned by + this method. + + + + + + See + , + for more information regarding this parameter. + + + + + + + + + + + Return Value + + + An NdbRecAttr object to hold the value of + the attribute, or a NULL pointer + indicating that an error has occurred. See + . + + + + + + + Example + + + +[To be supplied...] + + + + + +
+ +
+ + <literal>NdbEventOperation::getPreValue()</literal> + + + + Description + + + This method performs identically to getValue(), except that + it is used to define a retrieval operation of an attribute's + previous value rather than the current value. See + , for + details. + + + + + + + Signature + + + +NdbRecAttr* getPreValue + ( + const char* name, + char* value = 0 + ) + + + + + + + + Parameters + + + This method takes two parameters: + + + + + + The name of the attribute + (as a constant character pointer). + + + + + + A pointer to a value: + + + + + + If the attribute value is not + NULL, then the attribute + value is returned in this parameter. + + + + + + If the attribute value is + NULL, then the attribute + value is stored only in the + NdbRecAttr object returned by + this method. + + + + + + See + , + for more information regarding this parameter. + + + + + + + + + + + Return Value + + + An NdbRecAttr object to hold the value of + the attribute, or a NULL pointer + indicating that an error has occurred. See + . + + + + + + + Example + + + +[To be supplied...] + + + + + +
+ +
+ + <literal>NdbEventOperation::getBlobHandle()</literal> + + + + Description + + + This method is used in place of getValue() for blob + attributes. The blob handle + (NdbBlob)returned by this method supports + read operations only. + + + + + + + To obtain the previous value for a blob attribute, use + getPreBlobHandle. See + . + + + + + + Signature + + + +NdbBlob* getBlobHandle + ( + const char* name + ) + + + + + + + + Parameters + + + The name of the blob attribute. + + + + + + + Return Value + + + A pointer to an NdbBlob object. See + . + + + + + + + Example + + + +[To be supplied...] + + + + + +
+ +
+ + <literal>NdbEventOperation::getPreBlobHandle()</literal> + + + + Description + + + This function is the same as + getBlobHandle(), except that it is used + to access the previous value of the blob attribute. See + . + + + + + + + Signature + + + +NdbBlob* getPreBlobHandle + ( + const char* name + ) + + + + + + + + Parameters + + + The name of the blob attribute. + + + + + + + Return Value + + + A pointer to an NdbBlob. See + . + + + + + + + Example + + + +[To be supplied...] + + + + + +
+ +
+ + <literal>NdbEventOperation::getGCI()</literal> + + + + Description + + + This method retrieves the GCI for the most recently + retrieved event. + + + + + + + Signature + + + +Uint64 getGCI + ( + void + ) const + + + + + + + + Parameters + + + None. + + + + + + + Return Value + + + The global checkpoint index of the most recently retrieved + event (an integer). + + + + + + + Example + + + +[To be supplied...] + + + + + +
+ +
+ + <literal>NdbEventOperation::getLatestGCI()</literal> + + + + Description + + + This method retrieves the most recent GCI. + + + + + + + The CGI obtained using this method is not necessarily + associated with an event. + + + + + + Signature + + + +Uint64 getLatestGCI + ( + void + ) const + + + + + + + + Parameters + + + None. + + + + + + + Return Value + + + The index of the latest global checkpoint, an integer. + + + + + + + Example + + + +[To be supplied...] + + + + + +
+ +
+ + <literal>NdbEventOperation::getNdbError()</literal> + + + + Description + + + This method retrieves the most recent error. + + + + + + + Signature + + + +const struct NdbError& getNdbError + ( + void + ) const + + + + + + + + Parameters + + + None. + + + + + + + Return Value + + + A reference to an NdbError structure. See + . + + + + + + + Example + + + +[To be supplied...] + + + + + +
+ +
+ + <literal>NdbEventOperation::isConsistent()</literal> + + + + Description + + + Tnis method is used to determine whether event loss has + taken place following the failure of a node. + + + + + + + Signature + + + +bool isConsistent + ( + void + ) const + + + + + + + + Parameters + + + None. + + + + + + + Return Value + + + If event loss has taken place, then this method returns + false; otherwise, it returns + true. + + + + + + + Example + + + +[To be supplied...] + + + + + +
+ +
+ + <literal>NdbEventOperation::tableNameChanged()</literal> + + + + Description + + + This method tests whether a table name has changed as the + result of a TE_ALTER table event. (See + .) + + + + + + + Signature + + + +const bool tableNameChanged + ( + void + ) const + + + + + + + + Parameters + + + None. + + + + + + + Return Value + + + Returns true if the name of the table has + changed; otherwise, the mothod returns + false. + + + + + + + Example + + + +[To be supplied...] + + + + + +
+ +
+ + <literal>NdbEventOperation::tableFrmChanged()</literal> + + + + Description + + + Use this method to determine whether a table + .FRM file has changed in connection + with a TE_ALTER event. (See + .) + + + + + + + Signature + + + +const bool tableFrmChanged + ( + void + ) const + + + + + + + + Parameters + + + None. + + + + + + + Return Value + + + Returns true if the the table + .FRM file has changed; otherwise, the + mothod returns false. + + + + + + + Example + + + +[To be supplied...] + + + + + +
+ +
+ + <literal>NdbEventOperation::tableFragmentationChanged()</literal> + + + + Description + + + This method is used to test whether a table's fragmentation + has changed in connection with a TE_ALTER + event. (See .) + + + + + + + Signature + + + +const bool tableFragmentationChanged + ( + void + ) const + + + + + + + + Parameters + + + None. + + + + + + + Return Value + + + Returns true if the the table's + fragmentation has changed; otherwise, the method returns + false. + + + + + + + Example + + + +[To be supplied...] + + + + + +
+ +
+ + <literal></literal> + + + + Description + + + Use this method to check whether a table range partition + list name has changed in connection with a + TE_ALTER event. + + + + + + + Signature + + + +const bool tableRangeListChanged + ( + void + ) const + + + + + + + + Parameters + + + None. + + + + + + + Return Value + + + This method returns true if range or list + partition name has changed; otherwise it returns + false. + + + + + + + Example + + + +[To be supplied...] + + + + + +
+ +
+ + <literal>NdbEventOperation::mergeEvents()</literal> + + + + Description + + + This method is used to set the merge events flag. For + information about event merging, see + . + + + + + + + The merge events flag is false by + default. + + + + + + Signature + + + +void mergeEvents + ( + bool flag + ) + + + + + + + + Parameters + + + A Boolean flag. + + + + + + + Return Value + + + None. + + + + + + + Example + + + +[To be supplied...] + + + + + +
+ +
+ + <literal>NdbEventOperation::execute()</literal> + + + + Description + + + Activates the NdbEventOperation, so that + it can begin receiving events. Changed attribute values may + be retrieved after Ndb::nextEvent() has + returned not NULL. + getValue() or + getPreValue() must be called before + invoking execute(). + + + + + + + Before attempting to use this method, you should have read + the explanations provided in + , and + . Also see + . + + + + + + Signature + + + +int execute + ( + void + ) + + + + + + + + Parameters + + + None. + + + + + + + Return Value + + + This method returns 0 on success and + -1 on failure. + + + + + + + Example + + + +[To be supplied...] + + + + + +
+