IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

com.ibm.websphere.objectgrid.continuousquery
Interface ContinuousQueryTopic<KeyType,ValueType>

Type Parameters:
KeyType - Type of the key object for the map being queried
ValueType - Type of the value object for the map being queried

public interface ContinuousQueryTopic<KeyType,ValueType>

A Continuous Query Topic embodies the client side view of a defined Continuous Query. The topic gives access to the client-side cached results of the continuous query and allows for management of Continuous Query Listeners for this topic.

Since:
8.6

Method Summary
 void addListener(ContinuousQueryListener<KeyType,ValueType> listener)
          Add a Continuous Query Listener to this topic.
 Collection<ContinuousQueryListener<KeyType,ValueType>> getAllListeners()
          Returns a shallow copy of the current set of listeners registered for this query topic.
 ContinuousQueryCache<KeyType,ValueType> getCache()
          Return a continuous query cache object with methods to access the keys and values stored in the cache.
 String getName()
          Returns the generated unique name for this continuous query.
 boolean isKeysOnlyCache()
          Return true if the cache for this continuous query contains only keys.
 boolean isRawFormat()
          Return true if this query will return keys/values in SerializedEntry format.
 boolean noCache()
          Return true if the no caching option is enabled for this Continuous Query.
 void removeAllListeners()
          Removes all registered listeners from this query topic.
 boolean removeListener(ContinuousQueryListener<KeyType,ValueType> listener)
          Remove the listener from this continuous query's the set of listeners.
 

Method Detail

addListener

void addListener(ContinuousQueryListener<KeyType,ValueType> listener)
Add a Continuous Query Listener to this topic. The listener will be called when this topic receives updates to the query. There is no guarantee of the order that listeners will be called. Multiple adds of the same listener will result in only one call to the listener.

Parameters:
listener - the listener to add to this continuous query's set of listeners.

removeListener

boolean removeListener(ContinuousQueryListener<KeyType,ValueType> listener)
Remove the listener from this continuous query's the set of listeners. In flight notifications to this listener may continue after this method returns.

Parameters:
listener - - the continuous query listener to remove.
Returns:
true if the listener was removed.

getCache

ContinuousQueryCache<KeyType,ValueType> getCache()
Return a continuous query cache object with methods to access the keys and values stored in the cache.

Returns:
a Continuous Query Cache object for this topic.

getName

String getName()
Returns the generated unique name for this continuous query.

Returns:
a unique string.

isKeysOnlyCache

boolean isKeysOnlyCache()
Return true if the cache for this continuous query contains only keys. Return false if it also contains the value associated with the key.

Returns:
true if the cache does not contain values.

noCache

boolean noCache()
Return true if the no caching option is enabled for this Continuous Query.

Returns:
true if no keys or values are being cached.

isRawFormat

boolean isRawFormat()
Return true if this query will return keys/values in SerializedEntry format.

Returns:
true if RAW format is used, false if NATIVE format is used.

getAllListeners

Collection<ContinuousQueryListener<KeyType,ValueType>> getAllListeners()
Returns a shallow copy of the current set of listeners registered for this query topic.

Returns:
a new collection object containing all currently registered listeners.

removeAllListeners

void removeAllListeners()
Removes all registered listeners from this query topic. In flight notifications to listeners may continue after this method returns.


IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

© Copyright International Business Machines Corp 2005,2012. All rights reserved.