public interface Event
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.
This interface is implemented internally. Applications do not implement this interface.
| Modifier and Type | Field and Description |
|---|---|
static int |
TIBDG_EVENT_ERRORCODE_COPYSET_LEADER_FAILURE
Error Code Copyset Leader Failure
|
static int |
TIBDG_EVENT_ERRORCODE_GRID_REDISTRIBUTING
Error Code Grid Redistributing
|
static int |
TIBDG_EVENT_ERRORCODE_INVALID |
static int |
TIBDG_EVENT_ERRORCODE_PROXY_FAILURE
Error Code Proxy Failure
|
static int |
TIBDG_EVENT_ERRORCODE_TABLE_DELETED
Error Code Table Deleted
|
| Modifier and Type | Method and Description |
|---|---|
Row |
getCurrent()
Get the value of the row after the Put event
|
int |
getErrorCode()
Get the errorcode from an error event
|
java.lang.String |
getErrorDescription()
Get the description from an error event
|
Row |
getPrevious()
Get the value of the row of prior to the Put or Delete event
|
EventType |
getType()
Get the type of the event
|
static final int TIBDG_EVENT_ERRORCODE_INVALID
static final int TIBDG_EVENT_ERRORCODE_TABLE_DELETED
This error is generated when a table is deleted. The listener will not receive new events. The listener cannot be recreated afterwards
static final int TIBDG_EVENT_ERRORCODE_COPYSET_LEADER_FAILURE
This error is generated when a copyset leader fails. The listener will not receive new events. This error invalidates the listener but it may be recreated. The application should attempt to recreate the listener until it succeeds when a copyset leader becomes available.
static final int TIBDG_EVENT_ERRORCODE_GRID_REDISTRIBUTING
This error is generated when grid redistribution occurs when changing the number of copysets. The listener will not receive new events. This error invalidates the listener but it may be recreated. The application should attempt to recreate the listener until it succeeds when redistribution completes.
static final int TIBDG_EVENT_ERRORCODE_PROXY_FAILURE
This error is generated when the connection to the proxy is lost. The listener will not receive new events. This error invalidates the listener but it may be recreated. The application should attempt to recreate the listener until it succeeds when a proxy becomes available.
EventType getType() throws DataGridException
Other event functions only apply to certain types of events, so getType should be called to avoid exceptions.
EventTypeDataGridException - in case of failuresRow getPrevious() throws DataGridException
Calling getPrevious is only valid on Put and Delete events. The call will return null on a Put event where there was no previous value.
DataGridException - in case of failuresRow getCurrent() throws DataGridException
Calling getCurrent is only valid on Put events.
DataGridException - in case of failuresint getErrorCode()
throws DataGridException
The value will be one of the errorcode constants:
Event.TIBDG_EVENT_ERRORCODE_TABLE_DELETED
Event.TIBDG_EVENT_ERRORCODE_COPYSET_LEADER_FAILURE
Event.TIBDG_EVENT_ERRORCODE_GRID_REDISTRIBUTING
Event.TIBDG_EVENT_ERRORCODE_PROXY_FAILURE
The Listener is invalidated by an error but may be recreated unless the error is TIBDG_EVENT_ERRORCODE_TABLE_DELETED
DataGridException - in case of failuresjava.lang.String getErrorDescription()
throws DataGridException
DataGridException - in case of failures