Commit 2e3e531b authored by tomas@poseidon.ndb.mysql.com's avatar tomas@poseidon.ndb.mysql.com

Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb

into poseidon.ndb.mysql.com:/home/tomas/mysql-5.0-ndb
parents 44a25c73 287721ee
...@@ -52,6 +52,7 @@ typedef struct charset_info_st CHARSET_INFO; ...@@ -52,6 +52,7 @@ typedef struct charset_info_st CHARSET_INFO;
* -# Dropping secondary indexes (Dictionary::dropIndex) * -# Dropping secondary indexes (Dictionary::dropIndex)
* *
* NdbDictionary has several help (inner) classes to support this: * NdbDictionary has several help (inner) classes to support this:
* -# NdbDictionary::Dictionary the dictionary handling dictionary objects
* -# NdbDictionary::Table for creating tables * -# NdbDictionary::Table for creating tables
* -# NdbDictionary::Column for creating table columns * -# NdbDictionary::Column for creating table columns
* -# NdbDictionary::Index for creating secondary indexes * -# NdbDictionary::Index for creating secondary indexes
...@@ -909,6 +910,9 @@ public: ...@@ -909,6 +910,9 @@ public:
*/ */
class Event : public Object { class Event : public Object {
public: public:
/**
* Specifies the type of database operations an Event listens to
*/
enum TableEvent { enum TableEvent {
TE_INSERT=1, ///< Insert event on table TE_INSERT=1, ///< Insert event on table
TE_DELETE=2, ///< Delete event on table TE_DELETE=2, ///< Delete event on table
...@@ -916,6 +920,10 @@ public: ...@@ -916,6 +920,10 @@ public:
TE_ALL=7 ///< Any/all event on table (not relevant when TE_ALL=7 ///< Any/all event on table (not relevant when
///< events are received) ///< events are received)
}; };
/**
* Specifies the durability of an event
* (future version may supply other types)
*/
enum EventDurability { enum EventDurability {
ED_UNDEFINED ED_UNDEFINED
#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
...@@ -930,8 +938,8 @@ public: ...@@ -930,8 +938,8 @@ public:
// All API's can use it, // All API's can use it,
// But's its removed when ndb is restarted // But's its removed when ndb is restarted
#endif #endif
,ED_PERMANENT ///< All API's can use it, ,ED_PERMANENT ///< All API's can use it.
///< It's still defined after a restart ///< It's still defined after a cluster system restart
#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
= 3 = 3
#endif #endif
...@@ -950,9 +958,12 @@ public: ...@@ -950,9 +958,12 @@ public:
Event(const char *name, const NdbDictionary::Table& table); Event(const char *name, const NdbDictionary::Table& table);
virtual ~Event(); virtual ~Event();
/** /**
* Set/get unique identifier for the event * Set unique identifier for the event
*/ */
void setName(const char *name); void setName(const char *name);
/**
* Get unique identifier for the event
*/
const char *getName() const; const char *getName() const;
/** /**
* Define table on which events should be detected * Define table on which events should be detected
...@@ -967,7 +978,7 @@ public: ...@@ -967,7 +978,7 @@ public:
/** /**
* Set table for which events should be detected * Set table for which events should be detected
* *
* @note preferred way is using setTable(const NdbDictionary::Table) * @note preferred way is using setTable(const NdbDictionary::Table&)
* or constructor with table object parameter * or constructor with table object parameter
*/ */
void setTable(const char *tableName); void setTable(const char *tableName);
...@@ -1224,9 +1235,12 @@ public: ...@@ -1224,9 +1235,12 @@ public:
#endif #endif
/** /**
* Remove table/index from local cache * Remove table from local cache
*/ */
void removeCachedTable(const char * table); void removeCachedTable(const char * table);
/**
* Remove index from local cache
*/
void removeCachedIndex(const char * index, const char * table); void removeCachedIndex(const char * index, const char * table);
......
...@@ -26,7 +26,8 @@ class NdbEventOperationImpl; ...@@ -26,7 +26,8 @@ class NdbEventOperationImpl;
* *
* Brief description on how to work with events: * Brief description on how to work with events:
* *
* - An event i created in the Database through * - An event, represented by an NdbDictionary::Event, i created in the
* Database through
* NdbDictionary::Dictionary::createEvent() (note that this can be done * NdbDictionary::Dictionary::createEvent() (note that this can be done
* by any application or thread and not necessarily by the "listener") * by any application or thread and not necessarily by the "listener")
* - To listen to events, an NdbEventOperation object is instantiated by * - To listen to events, an NdbEventOperation object is instantiated by
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment