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:
    GemFire 5.5
    • 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

        java.lang.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

        java.lang.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

        java.lang.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:
        GemFire 6.5