olp-cpp-sdk 1.24.0
Loading...
Searching...
No Matches
PrefetchPartitionsResult.h
1/*
2 * Copyright (C) 2020 HERE Europe B.V.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 * SPDX-License-Identifier: Apache-2.0
17 * License-Filename: LICENSE
18 */
19
20#pragma once
21
22#include <string>
23#include <utility>
24#include <vector>
25
26#include <olp/dataservice/read/DataServiceReadApi.h>
27
28namespace olp {
29namespace dataservice {
30namespace read {
31
35class DATASERVICE_READ_API PrefetchPartitionsResult {
36 public:
41
47 void AddPartition(std::string partition) {
48 partitions.emplace_back(std::move(partition));
49 }
50
56 const std::vector<std::string>& GetPartitions() const { return partitions; }
57
63 std::vector<std::string>&& MovePartitions() { return std::move(partitions); }
64
65 private:
66 std::vector<std::string> partitions;
67};
68
69} // namespace read
70} // namespace dataservice
71} // namespace olp
Represents the result of a prefetch operation for partitions.
Definition PrefetchPartitionsResult.h:35
void AddPartition(std::string partition)
Adds the partition ID that was successfully downloaded.
Definition PrefetchPartitionsResult.h:47
const std::vector< std::string > & GetPartitions() const
Gets the list of prefetched partitions.
Definition PrefetchPartitionsResult.h:56
PrefetchPartitionsResult()=default
A parent type of the current PrefetchedPartitions class.
std::vector< std::string > && MovePartitions()
Moves the list of prefetched partitions.
Definition PrefetchPartitionsResult.h:63
Rules all the other namespaces.
Definition AppleSignInProperties.h:24