• Facebook
  • Twitter
  • Youtube
  • LinedIn
  • RSS
  • Docs
  • Comparisons
  • Blogs
  • Download
  • Contact Us
Download
Show / Hide Table of Contents

Method RegisterCQ

RegisterCQ(ContinuousQuery)

Registers the specified Continuous Query with the cache server. You can use this method multiple times in your application depending on its need to receive the notifications for a change in the dataset of your query. This method takes as argument an object of ContinuousQuery which has the query and the callbacks registered to it.

Declaration
[Obsolete("This API is deprecated and will be removed in a future release. This feature is being retired and will not be continued in future versions.", false)]
void RegisterCQ(ContinuousQuery query)
Parameters
Type Name Description
ContinuousQuery query

SQL-like query to be executed on cache.

Examples

The following example demonstrates how to register a continuous query with item added, updated and removed callbacks.

ICache cache = CacheManager.GetCache("demoCache");

string queryString = "SELECT MyApplication.Employee WHERE this.Salary > ?";

QueryCommand queryCommand = new QueryCommand(queryString);
queryCommand.Parameters.Add("Salary", 50000);

ContinuousQuery continuousQuery = new ContinuousQuery(queryCommand);

continuousQuery.RegisterNotification(new QueryDataNotificationCallback(query_ItemAdded), EventType.ItemAdded, EventDataFilter.None);
continuousQuery.RegisterNotification(new QueryDataNotificationCallback(query_ItemUpdated), EventType.ItemUpdated, EventDataFilter.DataWithMetadata);
continuousQuery.RegisterNotification(new QueryDataNotificationCallback(query_ItemRemoved), EventType.ItemRemoved, EventDataFilter.None);

cache.MessagingService.RegisterCQ(continuousQuery);

Contact Us

PHONE

+1 (214) 764-6933   (US)

+44 20 7993 8327   (UK)

 
EMAIL

sales@alachisoft.com

support@alachisoft.com

NCache
  • NCache Enterprise
  • NCache Community
  • Edition Comparison
  • NCache Architecture
  • Benchmarks
Download
Pricing
Try Playground

Deployments
  • Cloud (SaaS & Software)
  • On-Premises
  • Kubernetes
  • Docker
Technical Use Cases
  • ASP.NET Sessions
  • ASP.NET Core Sessions
  • Pub/Sub Messaging
  • Real-Time ASP.NET SignalR
  • Internet of Things (IoT)
  • NoSQL Database
  • Stream Processing
  • Microservices
Resources
  • Magazine Articles
  • Third-Party Articles
  • Articles
  • Videos
  • Whitepapers
  • Shows
  • Talks
  • Blogs
  • Docs
Customer Case Studies
  • Testimonials
  • Customers
Support
  • Schedule a Demo
  • Forum (Google Groups)
  • Tips
Company
  • Leadership
  • Partners
  • News
  • Events
  • Careers
Contact Us

  • EnglishChinese (Simplified)FrenchGermanItalianJapaneseKoreanPortugueseSpanish

  • Contact Us
  •  
  • Sitemap
  •  
  • Terms of Use
  •  
  • Privacy Policy
© Copyright Alachisoft 2002 - . All rights reserved. NCache is a registered trademark of Diyatech Corp.
Back to top