olp-cpp-sdk 1.25.0
Loading...
Searching...
No Matches
StreamOffsets.h
1/*
2 * Copyright (C) 2020-2026 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 <cstdint>
23#include <utility>
24#include <vector>
25
26#include <olp/dataservice/read/DataServiceReadApi.h>
27
28namespace olp {
29namespace dataservice {
30namespace read {
31namespace model {
32
36class DATASERVICE_READ_API StreamOffset final {
37 public:
38 StreamOffset() = default;
39
46 int32_t GetPartition() const { return partition_; }
53 void SetPartition(int32_t value) { partition_ = value; }
54
60 int64_t GetOffset() const { return offset_; }
66 void SetOffset(int64_t value) { offset_ = value; }
67
68 private:
72 int32_t partition_;
73
75 int64_t offset_;
76};
77
81class DATASERVICE_READ_API StreamOffsets final {
82 public:
83 StreamOffsets() = default;
84
90 const std::vector<StreamOffset>& GetOffsets() const { return offsets_; }
96 void SetOffsets(std::vector<StreamOffset> value) {
97 offsets_ = std::move(value);
98 }
99
100 private:
101 std::vector<StreamOffset> offsets_;
102};
103
104} // namespace model
105} // namespace read
106} // namespace dataservice
107} // namespace olp
An offset in a specific partition of a stream layer.
Definition StreamOffsets.h:36
void SetOffset(int64_t value)
Sets the offset for the request.
Definition StreamOffsets.h:66
int32_t GetPartition() const
Gets the partition of the stream layer for which this offset applies.
Definition StreamOffsets.h:46
void SetPartition(int32_t value)
Sets the partition of the stream layer.
Definition StreamOffsets.h:53
int64_t GetOffset() const
Gets the offset in the partition of the stream layer.
Definition StreamOffsets.h:60
Represents a list of offsets.
Definition StreamOffsets.h:81
void SetOffsets(std::vector< StreamOffset > value)
Sets the list of offsets.
Definition StreamOffsets.h:96
const std::vector< StreamOffset > & GetOffsets() const
Gets the list of offsets.
Definition StreamOffsets.h:90
Rules all the other namespaces.
Definition AppleSignInProperties.h:24