Apache Ignite C++ Client
Loading...
Searching...
No Matches
transaction_options.h
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
20namespace ignite {
25public:
31 [[nodiscard]] std::int64_t get_timeout_millis() const { return m_timeout_millis; }
32
39 transaction_options &set_timeout_millis(std::int64_t timeout_millis) {
40 m_timeout_millis = timeout_millis;
41 return *this;
42 }
43
49 [[nodiscard]] bool is_read_only() const { return m_read_only; }
50
58 m_read_only = read_only;
59 return *this;
60 }
61
62private:
63 std::int64_t m_timeout_millis = 0;
64 bool m_read_only = false;
65};
66} // namespace ignite
Definition transaction_options.h:24
transaction_options & set_timeout_millis(std::int64_t timeout_millis)
Definition transaction_options.h:39
bool is_read_only() const
Definition transaction_options.h:49
transaction_options & set_read_only(bool read_only)
Definition transaction_options.h:57
std::int64_t get_timeout_millis() const
Definition transaction_options.h:31