VMware Tanzu GemFire Native C++ Reference  10.1.5
ResultCollector.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_RESULTCOLLECTOR_H_
21 #define GEODE_RESULTCOLLECTOR_H_
22 
23 #include <chrono>
24 #include <memory>
25 
26 #include "CacheableBuiltins.hpp"
27 #include "internal/geode_globals.hpp"
28 
33 namespace apache {
34 namespace geode {
35 namespace client {
36 
64 class APACHE_GEODE_EXPORT ResultCollector {
68  public:
69  ResultCollector() = default;
70  virtual ~ResultCollector() noexcept = default;
71 
85  virtual std::shared_ptr<CacheableVector> getResult(
86  std::chrono::milliseconds timeout = DEFAULT_QUERY_RESPONSE_TIMEOUT) = 0;
87 
94  virtual void addResult(
95  const std::shared_ptr<Cacheable>& resultOfSingleExecution) = 0;
96 
102  virtual void endResults() = 0;
103 
110  virtual void clearResults() = 0;
111 };
112 
113 } // namespace client
114 } // namespace geode
115 } // namespace apache
116 
117 #endif // GEODE_RESULTCOLLECTOR_H_
apache::geode::client::ResultCollector::ResultCollector
ResultCollector()=default
public methods
apache::geode::client::Serializable
This base class is the superclass of all user objects in the cache that can be serialized.
Definition: Serializable.hpp:53
CacheableBuiltins.hpp
Contains generic template definitions for Cacheable types and instantiations for built-in types.
apache::geode::client::CacheableVector
A mutable Cacheable vector wrapper that can serve as a distributable object for caching.
Definition: CacheableBuiltins.hpp:283
apache::geode::client::ResultCollector
Defines the interface for a container that gathers results from function execution.
Definition: ResultCollector.hpp:64

Apache Geode C++ Cache API Documentation