Package com.alachisoft.ncache.client
Class ContinuousQuery
- java.lang.Object
-
- com.alachisoft.ncache.client.ContinuousQuery
-
public class ContinuousQuery extends java.lang.Object
Class to hold Object query and values, intended for notifications.
-
-
Constructor Summary
Constructors Constructor Description ContinuousQuery(QueryCommand command)
Initializes a new instance of the ContinuousQuery class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addDataModificationListener(QueryDataModificationListener listener, java.util.EnumSet<EventType> eventEnumSet, EventDataFilter datafilter)
This method registers a custom listener that is fired on change in dataset of a Continuous Query.boolean
equals(java.lang.Object obj)
Compares two instances of ContinuousQuery for equality.QueryCommand
getQueryCommand()
Gets the query command for the Continuous Query.int
hashCode()
Computes the hash code for the current object.void
removeDataModificationListener(QueryDataModificationListener listener, java.util.EnumSet<EventType> eventEnumSet)
This method unregisters a custom listener that is fired on change in dataset of a Continuous Query.void
setQueryCommand(QueryCommand value)
Sets the query command for the Continuous Query.
-
-
-
Constructor Detail
-
ContinuousQuery
public ContinuousQuery(QueryCommand command)
Initializes a new instance of the ContinuousQuery class.- Parameters:
command
-QueryCommand
containing query text and values.
-
-
Method Detail
-
getQueryCommand
public QueryCommand getQueryCommand()
Gets the query command for the Continuous Query.- Returns:
- The QueryCommand instance.
-
setQueryCommand
public void setQueryCommand(QueryCommand value)
Sets the query command for the Continuous Query.- Parameters:
value
- The QueryCommand instance.
-
addDataModificationListener
public void addDataModificationListener(QueryDataModificationListener listener, java.util.EnumSet<EventType> eventEnumSet, EventDataFilter datafilter) throws java.lang.IllegalArgumentException
This method registers a custom listener that is fired on change in dataset of a Continuous Query.- Parameters:
listener
- The listener that is invoked whenever there is a change in dataset of Continuous Query.eventEnumSet
- Registers the listener with the specified event types in the enumset.datafilter
- This enum is to describe when registering an event, upon raise how much data is retrieved from cache when the event is raised.- Throws:
java.lang.IllegalArgumentException
-
removeDataModificationListener
public void removeDataModificationListener(QueryDataModificationListener listener, java.util.EnumSet<EventType> eventEnumSet) throws java.lang.IllegalArgumentException
This method unregisters a custom listener that is fired on change in dataset of a Continuous Query.- Parameters:
listener
- The listener that was registered with Continuous Query.eventEnumSet
- Unregisters the listener with the specified event types in the enumset.- Throws:
java.lang.IllegalArgumentException
-
equals
public boolean equals(java.lang.Object obj)
Compares two instances of ContinuousQuery for equality.- Overrides:
equals
in classjava.lang.Object
- Parameters:
obj
- An instance of ContinuousQuery.- Returns:
- True, if both ContinuousQuery instances are the same. Otherwise false.
- See Also:
hashCode()
,HashMap
-
hashCode
public int hashCode()
Computes the hash code for the current object. This method is supported for the benefit of hash tables such as those provided byHashMap
.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- Hash code for the current object.
- See Also:
Object.equals(java.lang.Object)
,System.identityHashCode(java.lang.Object)
-
-