TIBCO ActiveSpaces®
Enumerations | Functions
event.h File Reference

Table Listeners receive event objects in their callback to indicate that a change has occurred on the table they are listening on. More...

Enumerations

enum  tibdgEventErrorCode {
  TIBDG_EVENT_ERROR_CODE_INVALID,
  TIBDG_EVENT_ERROR_CODE_TABLE_DELETED,
  TIBDG_EVENT_ERROR_CODE_COPYSET_LEADER_FAILURE,
  TIBDG_EVENT_ERROR_CODE_GRID_REDISTRIBUTING
}
 Enum representing the type of error. More...
 
enum  tibdgEventType {
  TIBDG_EVENT_TYPE_INVALID,
  TIBDG_EVENT_TYPE_PUT,
  TIBDG_EVENT_TYPE_DELETE,
  TIBDG_EVENT_TYPE_ERROR,
  TIBDG_EVENT_TYPE_EXPIRED
}
 Enum representing the type of a tibdgEvent. More...
 

Functions

TIBDG_API tibdgRow tibdgEvent_GetCurrent (tibEx e, tibdgEvent event)
 Get the value of the tibdgRow after the Put operation. More...
 
TIBDG_API tibdgEventErrorCode tibdgEvent_GetErrorCode (tibEx e, tibdgEvent event)
 Get the tibdgEventErrorCode from an error event. More...
 
TIBDG_API const char * tibdgEvent_GetErrorDescription (tibEx e, tibdgEvent event)
 Get the description of the error from an error event. More...
 
TIBDG_API tibdgRow tibdgEvent_GetPrevious (tibEx e, tibdgEvent event)
 Get the value of the tibdgRow prior to the Put or Delete operation. More...
 
TIBDG_API tibdgEventType tibdgEvent_GetType (tibEx e, tibdgEvent event)
 Get the tibdgEventType for this event. More...
 
TIBDG_API const char * tibdgEventErrorCode_ToString (tibEx e, tibdgEventErrorCode eventErrorCode)
 Get the string representation of the event error code. More...
 
TIBDG_API const char * tibdgEventType_ToString (tibEx e, tibdgEventType eventType)
 Get the string representation of the event type. More...
 

Detailed Description

Table Listeners receive event objects in their callback to indicate that a change has occurred on the table they are listening on.

Event objects are owned by the ActiveSpaces library and must not be accessed outside of the span of the Table Listener's callback function.

Enumeration Type Documentation

Enum representing the type of error.

Enumerator
TIBDG_EVENT_ERROR_CODE_INVALID 

Default, uninitialized value.

TIBDG_EVENT_ERROR_CODE_TABLE_DELETED 

The table has been deleted from the configuration, the listener will not receive any more events.

TIBDG_EVENT_ERROR_CODE_COPYSET_LEADER_FAILURE 

One of the Copyset Leaders has failed, recreate the listener when the Copyset Leader has restarted or a new primary has been elected.

TIBDG_EVENT_ERROR_CODE_GRID_REDISTRIBUTING 

The Grid is in the process of redistributing data, recreate the listener when the redistributing process is complete.

Enum representing the type of a tibdgEvent.

Enumerator
TIBDG_EVENT_TYPE_INVALID 

Default, uninitialized value.

TIBDG_EVENT_TYPE_PUT 

A client put a row into the table.

TIBDG_EVENT_TYPE_DELETE 

A client deleted a row from the table.

TIBDG_EVENT_TYPE_ERROR 

An error occurred in the system that relates to the table.

TIBDG_EVENT_TYPE_EXPIRED 

A row was removed from the table because it expired.

Function Documentation

TIBDG_API tibdgRow tibdgEvent_GetCurrent ( tibEx  e,
tibdgEvent  event 
)

Get the value of the tibdgRow after the Put operation.

Parameters
eThe exception object captures information about failures.
eventThe event
Returns
The current value
TIBDG_API tibdgEventErrorCode tibdgEvent_GetErrorCode ( tibEx  e,
tibdgEvent  event 
)

Get the tibdgEventErrorCode from an error event.

Parameters
eThe exception object captures information about failures.
eventThe event
Returns
The error code
TIBDG_API const char* tibdgEvent_GetErrorDescription ( tibEx  e,
tibdgEvent  event 
)

Get the description of the error from an error event.

Parameters
eThe exception object captures information about failures.
eventThe event
Returns
The description
TIBDG_API tibdgRow tibdgEvent_GetPrevious ( tibEx  e,
tibdgEvent  event 
)

Get the value of the tibdgRow prior to the Put or Delete operation.

Parameters
eThe exception object captures information about failures.
eventThe event
Returns
The previous value
TIBDG_API tibdgEventType tibdgEvent_GetType ( tibEx  e,
tibdgEvent  event 
)

Get the tibdgEventType for this event.

Parameters
eThe exception object captures information about failures.
eventThe event
Returns
The type of the event
TIBDG_API const char* tibdgEventErrorCode_ToString ( tibEx  e,
tibdgEventErrorCode  eventErrorCode 
)

Get the string representation of the event error code.

Parameters
eThe exception object captures information about failures.
eventErrorCodeThe error code to convert
Returns
On success, this call returns the corresponding string name for the error code.
On failure, this call returns NULL.
TIBDG_API const char* tibdgEventType_ToString ( tibEx  e,
tibdgEventType  eventType 
)

Get the string representation of the event type.

Parameters
eThe exception object captures information about failures.
eventTypeThe type to convert
Returns
On success, this call returns the corresponding string name for the event type.
On failure, this call returns NULL.