VMware Tanzu GemFire Native C++ Reference 10.3.0
QueryService.hpp
Go to the documentation of this file.
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements. See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18#pragma once
19
20#ifndef GEODE_QUERYSERVICE_H_
21#define GEODE_QUERYSERVICE_H_
22
23#include <memory>
24#include <string>
25
26#include "CqAttributes.hpp"
27#include "CqQuery.hpp"
28#include "CqServiceStatistics.hpp"
29#include "ExceptionTypes.hpp"
30#include "Query.hpp"
31#include "internal/geode_globals.hpp"
32
37namespace apache {
38namespace geode {
39namespace client {
40
47class APACHE_GEODE_EXPORT QueryService {
48 public:
49 typedef std::vector<std::shared_ptr<CqQuery>> query_container_type;
50
57 virtual std::shared_ptr<Query> newQuery(std::string querystr) = 0;
58
89 virtual std::shared_ptr<CqQuery> newCq(
90 std::string name, std::string querystr,
91 const std::shared_ptr<CqAttributes>& cqAttr, bool isDurable = false) = 0;
92
125 virtual std::shared_ptr<CqQuery> newCq(
126 std::string querystr, const std::shared_ptr<CqAttributes>& cqAttr,
127 bool isDurable = false) = 0;
128
133 virtual void closeCqs() = 0;
134
140 virtual query_container_type getCqs() const = 0;
141
146 virtual std::shared_ptr<CqQuery> getCq(const std::string& name) const = 0;
147
153 virtual void executeCqs() = 0;
154
158 virtual void stopCqs() = 0;
159
166 virtual std::shared_ptr<CqServiceStatistics> getCqServiceStatistics()
167 const = 0;
168
175 virtual std::shared_ptr<CacheableArrayList> getAllDurableCqsFromServer()
176 const = 0;
177};
178} // namespace client
179} // namespace geode
180} // namespace apache
181
182#endif // GEODE_QUERYSERVICE_H_
QueryService is the class obtained from a Cache.
Definition: QueryService.hpp:47
virtual void executeCqs()=0
@nativeclient Executes all the cqs on this client.
virtual std::shared_ptr< CqQuery > newCq(std::string querystr, const std::shared_ptr< CqAttributes > &cqAttr, bool isDurable=false)=0
@nativeclient Constructs a new named continuous query, represented by an instance of CqQuery.
virtual std::shared_ptr< CqQuery > newCq(std::string name, std::string querystr, const std::shared_ptr< CqAttributes > &cqAttr, bool isDurable=false)=0
Constructs a new named continuous query, represented by an instance of CqQuery.
virtual query_container_type getCqs() const =0
@nativeclient Retrieve all registered CQs @endnativeclient
virtual void closeCqs()=0
Close all CQs, and release resources associated with executing CQs.
virtual void stopCqs()=0
Stops all the cqs on this client.
virtual std::shared_ptr< CqServiceStatistics > getCqServiceStatistics() const =0
@nativeclient Get statistics information for all CQs
virtual std::shared_ptr< CacheableArrayList > getAllDurableCqsFromServer() const =0
Gets all the durable CQs registered by this client.
virtual std::shared_ptr< CqQuery > getCq(const std::string &name) const =0
Retrieve a CqQuery by name.
virtual std::shared_ptr< Query > newQuery(std::string querystr)=0
Get a new Query with the specified query string.

Apache Geode C++ Cache API Documentation