VMware GemFire Java API Reference
Package org.apache.geode.cache.query
Class CqAttributesFactory
- java.lang.Object
-
- org.apache.geode.cache.query.CqAttributesFactory
-
public class CqAttributesFactory extends java.lang.ObjectThe factory class for the CqAttributes instance. This provides the CqListener setter methods. This class maintains state for and creates new instances of the CqAttributes interface for new CqQuery instances. If you create a factory with the default constructor, then the factory is set up to create attributes with all default settings. You can also create a factory by providing aCqAttributes, which will set up the new factory with the settings provided in that attributes instance.Once a
CqAttributesis created, it can only be modified after it has been used to create aCqQuery.- Since:
- GemFire 5.5
- See Also:
CqAttributes
-
-
Constructor Summary
Constructors Constructor Description CqAttributesFactory()Creates a new instance of AttributesFactory ready to create aCqAttributeswith default settings.CqAttributesFactory(CqAttributes cqAttributes)Creates a new instance of CqAttributesFactory ready to create aCqAttributeswith the same settings as those in the specifiedCqAttributes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCqListener(CqListener cqListener)Adds a CQ listener to the end of the list of cq listeners on this factory.CqAttributescreate()Creates aCqAttributeswith the current settings.voidinitCqListeners(CqListener[] cqListeners)Removes all Cq listeners and then adds each listener in the specified array.voidsetExcludedEvents(java.util.Set<ExcludedEvent> excludedEvents)Exclude operations in the CQ.
-
-
-
Constructor Detail
-
CqAttributesFactory
public CqAttributesFactory()
Creates a new instance of AttributesFactory ready to create aCqAttributeswith default settings.
-
CqAttributesFactory
public CqAttributesFactory(CqAttributes cqAttributes)
Creates a new instance of CqAttributesFactory ready to create aCqAttributeswith the same settings as those in the specifiedCqAttributes.- Parameters:
cqAttributes- theCqAttributesused to initialize this AttributesFactory
-
-
Method Detail
-
addCqListener
public void addCqListener(CqListener cqListener)
Adds a CQ listener to the end of the list of cq listeners on this factory.- Parameters:
cqListener- the CqListener to add to the factory.- Throws:
java.lang.IllegalArgumentException- ifcqListeneris null
-
initCqListeners
public void initCqListeners(CqListener[] cqListeners)
Removes all Cq listeners and then adds each listener in the specified array.- Parameters:
cqListeners- a possibly null or empty array of listeners to add to this factory.- Throws:
java.lang.IllegalArgumentException- if thecqListenersarray has a null element
-
setExcludedEvents
public void setExcludedEvents(java.util.Set<ExcludedEvent> excludedEvents)
Exclude operations in the CQ.- Parameters:
excludedEvents- a set of cache events to be excluded. When a cache event occurs that has an event type that matches in the excludedEvents set, the event will not be sent to clients.
-
create
public CqAttributes create()
Creates aCqAttributeswith the current settings.- Returns:
- the newly created
CqAttributes
-
-