Hazelcast C++ Client
Hazelcast C++ Client Library
Loading...
Searching...
No Matches
transactional_list.h
1/*
2 * Copyright (c) 2008-2025, Hazelcast, Inc. All Rights Reserved.
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#pragma once
17
18#include "hazelcast/client/proxy/TransactionalListImpl.h"
19
20namespace hazelcast {
21namespace client {
25class transactional_list : public proxy::TransactionalListImpl
26{
27 friend class transaction_context;
28
29public:
35 template<typename E>
36 boost::future<bool> add(const E& e)
37 {
38 return proxy::TransactionalListImpl::add(to_data(e));
39 }
40
46 template<typename E>
47 boost::future<bool> remove(const E& e)
48 {
49 return proxy::TransactionalListImpl::remove(to_data(e));
50 }
51
52private:
53 transactional_list(const std::string& instance_name,
54 txn::TransactionProxy& context)
55 : proxy::TransactionalListImpl(instance_name, context)
56 {}
57};
58} // namespace client
59} // namespace hazelcast
Transactional implementation of ilist.
boost::future< bool > add(const E &e)
Add new item to transactional list.
boost::future< bool > remove(const E &e)
Add item from transactional list.