CqEvent Object
The CqEvent
object contains information about the CQ event.
- Entry key and new value.
- Base operation that triggered the CQ event in the server.
-
CqQuery
object associated with this CQ event. - Query operation associated with this CQ event. This operation describes the change affected to the query results by the cache event. Possible values are:
-
CREATE
, which corresponds to the standard databaseINSERT
operation. -
UPDATE
-
DESTROY
, which corresponds to the standard databaseDELETE
operation.
-
This table describes the query operation based on whether the old and new entry values in the region entry event satisfy the query criteria.
Old Entry Value | New Entry Value | Query Operation |
No value or value does not satisfy the query criteria. | No value (operation is invalidate or destroy ) or value does not satisfy the query.
Value satisfies the query. |
N/A - no event
|
Value satisfies the query | No value (operation is invalidate or destroy ) or value does not satisfy the query.
Value satisfies the query. |
destroy
|
Table 1. Query Operation Based on Old and New Entry Values
You can use the query operation to decide what to do with the CqEvent
in your listeners. For example, a CqListener
that displays query results on screen might stop displaying the entry, start displaying the entry, or update the entry display depending on the query operation.