GemFire 6.6.3

com.gemstone.gemfire.cache.query
Interface CqEvent


public interface CqEvent

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.

Since:
5.5

Method Summary
 Operation getBaseOperation()
          Get the operation on the base region that triggered this event.
 CqQuery getCq()
          Get the CqQuery object of this event.
 byte[] getDeltaValue()
          Get the delta modification.
 Object getKey()
          Get the key relating to the event.
 Object getNewValue()
          Get the new value of the modification.
 Operation getQueryOperation()
          Get the operation on the query results.
 Throwable getThrowable()
          If an error occurred, return the Throwable, otherwise return null.
 

Method Detail

getCq

CqQuery getCq()
Get the CqQuery object of this event.

Returns:
CqQuery object.
See Also:
CqQuery

getBaseOperation

Operation getBaseOperation()
Get the operation on the base region that triggered this event.

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

getQueryOperation

Operation getQueryOperation()
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.

getKey

Object getKey()
Get the key relating to the event. In case of REGION_CLEAR and REGION_INVALIDATE operation, the key will be null.

Returns:
Object key.

getNewValue

Object getNewValue()
Get the new value of the modification. If there is no new value returns null, this will happen during delete operation. May throw InvalidDeltaException, if value is null and Delta Propagation is enabled.

Returns:
Object new/modified value.

getThrowable

Throwable getThrowable()
If an error occurred, return the Throwable, otherwise return null. If an error occurred, then this event will be passed to the onError method of the CqListener instead of the onEvent method.

Returns:
Throwable exception related to error.

getDeltaValue

byte[] getDeltaValue()
Get the delta modification. If there is no delta, returns null. New value may still be available.

Returns:
byte[] delta value.
Since:
6.5

GemFire 6.6.3

Copyright © 1997-2012 VMware, Inc. All rights reserved.