VMware Tanzu GemFire Native C++ Reference 10.2.7
apache::geode::client::CqEvent Class Referenceabstract

This interface provides methods to get all the information sent from the server about the CQ event. More...

#include <CqEvent.hpp>

Public Member Functions

virtual CqOperation getBaseOperation () const =0
 Get the operation on the base region that triggered this event. More...
 
virtual std::shared_ptr< CqQuerygetCq () const =0
 Get the CqQuery object of this event. More...
 
virtual std::shared_ptr< CacheableBytesgetDeltaValue () const =0
 Get the delta modification. More...
 
virtual std::shared_ptr< CacheableKeygetKey () const =0
 Get the key relating to the event. More...
 
virtual std::shared_ptr< CacheablegetNewValue () const =0
 Get the new value of the modification. More...
 
virtual CqOperation getQueryOperation () const =0
 Get the operation on the query results. More...
 

Detailed Description

This interface provides methods to get all the information sent from the server about the CQ event.

The CqEvent is passed to the CQs CqListener methods. It can be used to retrieve such information as the region operation, CQ operation associated with the event, the new key and value from the event, and the CqQuery object associated with the event. The CqEvent is not an extension of CacheEvent.

Member Function Documentation

◆ getBaseOperation()

virtual CqOperation apache::geode::client::CqEvent::getBaseOperation ( ) const
pure virtual

Get the operation on the base region that triggered this event.

Returns
Operation operation on the base region (on which CQ is created).

◆ getCq()

virtual std::shared_ptr< CqQuery > apache::geode::client::CqEvent::getCq ( ) const
pure virtual

Get the CqQuery object of this event.

See also
CqQuery
Returns
CqQuery object.

◆ getDeltaValue()

virtual std::shared_ptr< CacheableBytes > apache::geode::client::CqEvent::getDeltaValue ( ) const
pure virtual

Get the delta modification.

If there is no delta, returns null. New value may still be available.

Returns
CacheableBytes delta value.

◆ getKey()

virtual std::shared_ptr< CacheableKey > apache::geode::client::CqEvent::getKey ( ) const
pure virtual

Get the key relating to the event.

In case of REGION_CLEAR and REGION_INVALIDATE operation, the key will be nullptr.

Returns
Object key.

◆ getNewValue()

virtual std::shared_ptr< Cacheable > apache::geode::client::CqEvent::getNewValue ( ) const
pure virtual

Get the new value of the modification.

If there is no new value returns nullptr, this will happen during delete operation.

Returns
Object new/modified value.

◆ getQueryOperation()

virtual CqOperation apache::geode::client::CqEvent::getQueryOperation ( ) const
pure virtual

Get the operation on the query results.

Supported operations include update, create, destroy, region clear and region invalidate.

Returns
Operation operation with respect to CQ.

Apache Geode C++ Cache API Documentation