MySQL 5.6.14 Source Code Document
|
Represents an Event in NDB Cluster. More...
#include <NdbDictionary.hpp>
Public Types | |
enum | TableEvent { TE_INSERT = 1<<0, TE_DELETE = 1<<1, TE_UPDATE = 1<<2, TE_SCAN = 1<<3, TE_FIRST_NON_DATA_EVENT = 1<<4, TE_DROP = 1<<4, TE_ALTER = 1<<5, TE_CREATE = 1<<6, TE_GCP_COMPLETE = 1<<7, TE_CLUSTER_FAILURE = 1<<8, TE_STOP = 1<<9, TE_NODE_FAILURE = 1<<10, TE_SUBSCRIBE = 1<<11, TE_UNSUBSCRIBE = 1<<12, TE_ALL = 0xFFFF } |
enum | _TableEvent { _TE_INSERT = 0, _TE_DELETE = 1, _TE_UPDATE = 2, _TE_SCAN = 3, _TE_FIRST_NON_DATA_EVENT = 4, _TE_DROP = 4, _TE_ALTER = 5, _TE_CREATE = 6, _TE_GCP_COMPLETE = 7, _TE_CLUSTER_FAILURE = 8, _TE_STOP = 9, _TE_NODE_FAILURE = 10, _TE_SUBSCRIBE = 11, _TE_UNSUBSCRIBE = 12, _TE_NUL = 13, _TE_ACTIVE = 14 } |
enum | EventDurability { ED_UNDEFINED = 0, ED_PERMANENT = 3 } |
enum | EventReport { ER_UPDATED = 0, ER_ALL = 1, ER_SUBSCRIBE = 2, ER_DDL = 4 } |
Public Types inherited from NdbDictionary::Object | |
enum | Status { New, Changed, Retrieved, Invalid, Altered } |
enum | Type { TypeUndefined = 0, SystemTable = 1, UserTable = 2, UniqueHashIndex = 3, OrderedIndex = 6, HashIndexTrigger = 7, IndexTrigger = 8, SubscriptionTrigger = 9, ReadOnlyConstraint = 10, TableEvent = 11, Tablespace = 20, LogfileGroup = 21, Datafile = 22, Undofile = 23, ReorgTrigger = 19, HashMap = 24 } |
enum | State { StateUndefined = 0, StateOffline = 1, StateBuilding = 2, StateDropping = 3, StateOnline = 4, StateBackup = 5, StateBroken = 9 } |
enum | Store { StoreUndefined = 0, StoreNotLogged = 1, StorePermanent = 2 } |
enum | FragmentType { FragUndefined = 0, FragSingle = 1, FragAllSmall = 2, FragAllMedium = 3, FragAllLarge = 4, DistrKeyHash = 5, DistrKeyLin = 6, UserDefined = 7, HashMapPartition = 9 } |
Public Member Functions | |
Event (const char *name) | |
Event (const char *name, const NdbDictionary::Table &table) | |
int | setName (const char *name) |
const char * | getName () const |
const NdbDictionary::Table * | getTable () const |
void | setTable (const NdbDictionary::Table &table) |
int | setTable (const char *tableName) |
const char * | getTableName () const |
void | addTableEvent (const TableEvent te) |
bool | getTableEvent (const TableEvent te) const |
void | setDurability (EventDurability) |
EventDurability | getDurability () const |
void | setReport (EventReport) |
EventReport | getReport () const |
void | addColumn (const Column &c) |
void | addEventColumn (unsigned attrId) |
void | addEventColumn (const char *columnName) |
void | addEventColumns (int n, const char **columnNames) |
int | getNoOfEventColumns () const |
const Column * | getEventColumn (unsigned no) const |
void | mergeEvents (bool flag) |
virtual Object::Status | getObjectStatus () const |
virtual int | getObjectVersion () const |
virtual int | getObjectId () const |
void | print () |
Friends | |
class | NdbEventImpl |
class | NdbEventOperationImpl |
Represents an Event in NDB Cluster.
Definition at line 1404 of file NdbDictionary.hpp.
Specifies the durability of an event (future version may supply other types)
Definition at line 1456 of file NdbDictionary.hpp.
Specifies reporting options for table events
Definition at line 1480 of file NdbDictionary.hpp.
Specifies the type of database operations an Event listens toTableEvent must match 1 << TriggerEvent
Definition at line 1412 of file NdbDictionary.hpp.
NdbDictionary::Event::Event | ( | const char * | name | ) |
Constructor
name | Name of event |
Definition at line 1292 of file NdbDictionary.cpp.
NdbDictionary::Event::Event | ( | const char * | name, |
const NdbDictionary::Table & | table | ||
) |
Constructor
name | Name of event |
table | Reference retrieved from NdbDictionary |
Definition at line 1298 of file NdbDictionary.cpp.
void NdbDictionary::Event::addEventColumn | ( | unsigned | attrId | ) |
Add a column on which events should be detected
attrId | Column id |
Definition at line 1398 of file NdbDictionary.cpp.
void NdbDictionary::Event::addEventColumn | ( | const char * | columnName | ) |
Add a column on which events should be detected
columnName | Column name |
Definition at line 1404 of file NdbDictionary.cpp.
void NdbDictionary::Event::addEventColumns | ( | int | n, |
const char ** | columnNames | ||
) |
Add several columns on which events should be detected
Definition at line 1411 of file NdbDictionary.cpp.
void NdbDictionary::Event::addTableEvent | ( | const TableEvent | te | ) |
Add type of event that should be detected
Reimplemented in NdbEventImpl.
Definition at line 1355 of file NdbDictionary.cpp.
NdbDictionary::Event::EventDurability NdbDictionary::Event::getDurability | ( | ) | const |
Get durability of the event
Reimplemented in NdbEventImpl.
Definition at line 1373 of file NdbDictionary.cpp.
const NdbDictionary::Column * NdbDictionary::Event::getEventColumn | ( | unsigned | no | ) | const |
Get a specific column in the event
Reimplemented in NdbEventImpl.
Definition at line 1423 of file NdbDictionary.cpp.
const char * NdbDictionary::Event::getName | ( | ) | const |
Get unique identifier for the event
Reimplemented in NdbEventImpl.
Definition at line 1325 of file NdbDictionary.cpp.
int NdbDictionary::Event::getNoOfEventColumns | ( | ) | const |
Get no of columns defined in an Event
Reimplemented in NdbEventImpl.
Definition at line 1417 of file NdbDictionary.cpp.
|
virtual |
|
virtual |
Get object status
Implements NdbDictionary::Object.
Definition at line 1434 of file NdbDictionary.cpp.
|
virtual |
Get object version
Implements NdbDictionary::Object.
Definition at line 1440 of file NdbDictionary.cpp.
NdbDictionary::Event::EventReport NdbDictionary::Event::getReport | ( | ) | const |
Get report option of the event
Reimplemented in NdbEventImpl.
Definition at line 1385 of file NdbDictionary.cpp.
const NdbDictionary::Table * NdbDictionary::Event::getTable | ( | ) | const |
Get table that the event is defined on
Reimplemented in NdbEventImpl.
Definition at line 1337 of file NdbDictionary.cpp.
bool NdbDictionary::Event::getTableEvent | ( | const TableEvent | te | ) | const |
Check if a specific table event will be detected
Reimplemented in NdbEventImpl.
Definition at line 1361 of file NdbDictionary.cpp.
const char * NdbDictionary::Event::getTableName | ( | ) | const |
Get table name for events
Reimplemented in NdbEventImpl.
Definition at line 1349 of file NdbDictionary.cpp.
void NdbDictionary::Event::mergeEvents | ( | bool | flag | ) |
The merge events flag is false by default. Setting it true implies that events are merged in following ways:
NOTE: Currently this flag is not inherited by NdbEventOperation and must be set on NdbEventOperation explicitly.
Definition at line 1428 of file NdbDictionary.cpp.
void NdbDictionary::Event::setDurability | ( | EventDurability | d | ) |
Set durability of the event
Reimplemented in NdbEventImpl.
Definition at line 1367 of file NdbDictionary.cpp.
int NdbDictionary::Event::setName | ( | const char * | name | ) |
Set unique identifier for the event
Reimplemented in NdbEventImpl.
Definition at line 1319 of file NdbDictionary.cpp.
void NdbDictionary::Event::setReport | ( | EventReport | r | ) |
Set report option of the event
Reimplemented in NdbEventImpl.
Definition at line 1379 of file NdbDictionary.cpp.
void NdbDictionary::Event::setTable | ( | const NdbDictionary::Table & | table | ) |
Define table on which events should be detected
table | reference retrieved from NdbDictionary |
Reimplemented in NdbEventImpl.
Definition at line 1331 of file NdbDictionary.cpp.
int NdbDictionary::Event::setTable | ( | const char * | tableName | ) |
Set table for which events should be detected
Reimplemented in NdbEventImpl.
Definition at line 1343 of file NdbDictionary.cpp.