Alachisoft NCache 4.1 - Online Documentation

Continuous Query

NCache provides Continuous Query support for both .NET and Java clients. Continuous Query is a technique of registering queries on a cache server and associating list of related events with them in order to get the latest result. It notifies about the changes occured in query result set and therefore, client applications don't have to re-query the data for updates. This process is ideal for the scenarios where application repeats a specific query and would benefit from always having an up-to-date query result set.
Continuous Query is also capable of notifying an ongoing stream of events related to the specific query result set. Here cache monitors the result set of a query for any Add/Update/Remove event and notifies the application accordingly, which eventually helps in maintaining an up-to-date copy of data all the time.
Continuous Query endow with a list of events that are fired when any add, update or delete operation is performed on the data set which in return affects query result set. Applications can register interest for these events and are therefore notified whenever a query result set changes.
NCache also provides Object Query Language (OQL) to let you search the cache. You have to make API calls and specify a search based on this OQL in order to register/unregister and fetch a collection of objects from the cache. NCache requires all searchable attributes to be indexed. See Indexing Searchable Attributes in Java for details on indexing.
Include the following import statement in your application:
import com.alachisoft.ncache.web.caching.*;
import java.util.HashMap;
import java.util.*;
See Also

Copyright © 2005-2012 Alachisoft. All rights reserved.