This section discusses how to access and manage your CQs from your client. The calls discussed here are all executed specifically for the calling client. A client cannot access or modify the CQs belonging to another client.
This section discusses how to access and manage your CQs from your client. The calls discussed here are all executed specifically for the calling client. A client cannot access or modify the CQs belonging to another client.
For detailed method usage, see the online API documentation.
You can use the QueryServicegetCq* methods to access a single named CQ, an array of all CQs registered, and an array of all CQs registered in the client. You canuse the CqEvent.getCq method to access the CQ used to produce a CqEvent.
CQ runtime statistics are available for the client through the CqServiceStatistics and CqStatistics interfaces described under CQ API and Main Features. You can get information on the events generated by a specific CQ from the CqStatistics object returned by CqQuery.GetStatistics. You can get higher-level information about the CQs the client has registered, running, and so on, from the CqServiceStatistics object returned by QueryService.GetCqStatistics .
For both the client and server, you can access these statistics by loading the statistics archive file into VSD. The VSD (Visual Statistics Display) tool can be acquired as part of the GemFire main product download.
Client statistics are for the single client only. The server's pertain to all clients with CQs on this server.
You can modify the attributes for an existing CQ using the methods provided by CqQuery.GetCqAttributesMutator. The attributes consist of a list of listeners.
You stop individual CQs with the CqQuerystop method. You can stop all CQs for the client through the QueryService. Stopped CQs are in the same state as new CQs that have not yet been executed. You can close or execute a stopped CQ.
You close individual CQs with the CqQueryclose method. You can also close all CQs for the client through the QueryService. Closed CQs cannot be executed. CQs are also closed in the following cases: