VMware Tanzu GemFire Native C++ Reference  10.1.5
CqQuery.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_CQQUERY_H_
21 #define GEODE_CQQUERY_H_
22 
23 #include <chrono>
24 
25 #include "CqAttributes.hpp"
26 #include "CqAttributesMutator.hpp"
27 #include "CqResults.hpp"
28 #include "CqState.hpp"
29 #include "CqStatistics.hpp"
30 #include "internal/geode_globals.hpp"
31 
36 namespace apache {
37 namespace geode {
38 namespace client {
39 class Query;
40 
54 class APACHE_GEODE_EXPORT CqQuery {
55  public:
61  virtual const std::string& getQueryString() const = 0;
62 
67  virtual std::shared_ptr<Query> getQuery() const = 0;
68 
73  virtual const std::string& getName() const = 0;
74 
79  virtual std::shared_ptr<CqStatistics> getStatistics() const = 0;
80 
85  virtual std::shared_ptr<CqAttributes> getCqAttributes() const = 0;
86 
92 
112  virtual std::shared_ptr<CqResults> executeWithInitialResults(
113  std::chrono::milliseconds timeout = DEFAULT_QUERY_RESPONSE_TIMEOUT) = 0;
114 
129  virtual void execute() = 0;
130 
139  virtual void stop() = 0;
140 
147  virtual CqState getState() = 0;
148 
156  virtual void close() = 0;
157 
162  virtual bool isRunning() const = 0;
163 
168  virtual bool isStopped() const = 0;
169 
174  virtual bool isClosed() const = 0;
175 
181  virtual bool isDurable() const = 0;
182 };
183 
184 } // namespace client
185 } // namespace geode
186 } // namespace apache
187 
188 #endif // GEODE_CQQUERY_H_
apache::geode::client::CqQuery::isRunning
virtual bool isRunning() const =0
This allows to check if the CQ is in running or active.
apache::geode::client::CqAttributesMutator
This interface is used to modify the listeners that are associated with a CQ.
Definition: CqAttributesMutator.hpp:43
CqAttributesMutator.hpp
apache::geode::client::CqQuery::executeWithInitialResults
virtual std::shared_ptr< CqResults > executeWithInitialResults(std::chrono::milliseconds timeout=DEFAULT_QUERY_RESPONSE_TIMEOUT)=0
Start executing the CQ or if this CQ is stopped earlier, resumes execution of the CQ.
apache::geode::client::CqQuery::getState
virtual CqState getState()=0
Get the state of the CQ in CqState object form.
CqState.hpp
apache::geode::client::CqQuery::getName
virtual const std::string & getName() const =0
Get the name of the CQ.
CqState
This interface gives information on the state of a CqQuery.
apache::geode::client::CqQuery::getQueryString
virtual const std::string & getQueryString() const =0
Get the query string provided when a new Query was created from a QueryService.
apache::geode::client::CqQuery::close
virtual void close()=0
Close the CQ and stop execution.
apache::geode::client::CqQuery::getCqAttributes
virtual std::shared_ptr< CqAttributes > getCqAttributes() const =0
Get the Attributes of this CQ.
apache::geode::client::CqQuery::isStopped
virtual bool isStopped() const =0
This allows to check if the CQ is in stopped.
apache::geode::client::CqQuery::getQuery
virtual std::shared_ptr< Query > getQuery() const =0
Get teh query object generated for this CQs query.
apache::geode::client::CqQuery::getStatistics
virtual std::shared_ptr< CqStatistics > getStatistics() const =0
Get the statistics information of this CQ.
apache::geode::client::CqQuery::isClosed
virtual bool isClosed() const =0
This allows to check if the CQ is closed.
apache::geode::client::CqQuery::stop
virtual void stop()=0
Stops this CqQuery without releasing resources.
CqResults.hpp
apache::geode::client::CqQuery::getCqAttributesMutator
virtual CqAttributesMutator getCqAttributesMutator() const =0
Get the AttributesMutator of this CQ.
apache::geode::client::CqQuery::isDurable
virtual bool isDurable() const =0
This allows to check if the CQ is durable.
apache::geode::client::CqQuery
A Query is obtained from a QueryService which in turn is obtained from the Cache.
Definition: CqQuery.hpp:54
CqStatistics.hpp
apache::geode::client::CqQuery::execute
virtual void execute()=0
Executes the OQL Query on the cache server and returns the results.

Apache Geode C++ Cache API Documentation