LATEST VERSION: 8.2.7 - CHANGELOG
Pivotal GemFire® v8.2

CqEvent Object

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 database INSERT operation.
    • UPDATE
    • DESTROY, which corresponds to the standard database DELETE 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.
Table 1. Query Operation Based on Old and New Entry Values
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

create

Value satisfies the query No value (operation is invalidate or destroy) or value does not satisfy the query.

Value satisfies the query.

destroy

update

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.