Hazelcast C++ Client
Hazelcast C++ Client Library
Loading...
Searching...
No Matches
distributed_object.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/util/export.h"
19
20#include <string>
21#include <boost/thread/future.hpp>
22
23#if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
24#pragma warning(push)
25#pragma warning(disable : 4251) // for dll export
26#pragma warning(disable : 4250) // for warning class1' : inherits
27 // 'class2::member' via dominance
28#endif
29
30namespace hazelcast {
31namespace client {
32namespace impl {
33class hazelcast_client_instance_impl;
34}
35
51class HAZELCAST_API distributed_object
52{
53 friend class impl::hazelcast_client_instance_impl;
54
55public:
59 virtual const std::string& get_service_name() const = 0;
60
66 virtual const std::string& get_name() const = 0;
67
72 virtual boost::future<void> destroy() = 0;
73
77 virtual ~distributed_object() = default;
78};
79
80} // namespace client
81} // namespace hazelcast
82
83#if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
84#pragma warning(pop)
85#endif
Base class for all distributed objects.
virtual const std::string & get_name() const =0
Returns the unique name for this DistributedObject.
virtual boost::future< void > destroy()=0
Destroys this object cluster-wide.
virtual ~distributed_object()=default
Destructor.
virtual const std::string & get_service_name() const =0
Returns the service name for this object.