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 TypeMethodDescriptionvoidaddCqListener(CqListener aListener) Adds a CQ listener to the end of the list of CQ listeners on this CqQuery.voidinitCqListeners(CqListener[] newListeners) Adds the given set CqListner on this CQ.voidremoveCqListener(CqListener aListener) Removes given CQ listener from the list of CQ listeners on this CqQuery.
-
Method Details
-
addCqListener
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- ifaListeneris null
-
removeCqListener
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- ifaListeneris null
-
initCqListeners
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 thenewListenersarray has a null element
-