CqAttributesMutator (Apache Geode 2.0.2)
Description: declaration: package: org.apache.geode.cache.query, interface: CqAttributesMutator

Package org.apache.geode.cache.query

# Interface CqAttributesMutator

public interface CqAttributesMutator
This interface is used to modify the listeners that are associated with a CQ. Each CqQuery has an CqAttributesMutator interface which supports modification of certain CQ attributes after the CQ has been created.

Since:
  GemFire 5.5

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addCqListener(CqListener aListener)`
  Adds a CQ listener to the end of the list of CQ listeners on this CqQuery.
  `void`
  `initCqListeners(CqListener[] newListeners)`
  Adds the given set CqListner on this CQ.
  `void`
  `removeCqListener(CqListener aListener)`
  Removes given CQ listener from the list of CQ listeners on this CqQuery.

- ## Method Details

  - ### addCqListener

    void addCqListener(CqListener aListener)
    Adds a CQ listener to the end of the list of CQ listeners on this CqQuery.
    Parameters:
      `aListener` - the user defined CQ listener to add to the CqQuery.
    Throws:
      `IllegalArgumentException` - if `aListener` is null

  - ### removeCqListener

    void removeCqListener(CqListener aListener)
    Removes given CQ listener from the list of CQ listeners on this CqQuery. Does nothing if the specified listener has not been added. If the specified listener has been added then will be called on it; otherwise does nothing.
    Parameters:
      `aListener` - the CQ listener to remove from the CqQuery.
    Throws:
      `IllegalArgumentException` - if `aListener` is null

  - ### initCqListeners

    void initCqListeners(CqListener[] newListeners)
    Adds the given set CqListner on this CQ. If the CQ already has CqListeners, this removes those old CQs and initializes with the newListeners.
    Parameters:
      `newListeners` - a possibly null or empty array of listeners to add to this CqQuery.
    Throws:
      `IllegalArgumentException` - if the `newListeners` array has a null element