Hazelcast C++ Client
DistributedObject.h
1 /*
2  * Copyright (c) 2008-2017, 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 //
17 // Created by sancar koyunlu on 12/11/13.
18 
19 #ifndef HAZELCAST_DistributedObject
20 #define HAZELCAST_DistributedObject
21 
22 #include "hazelcast/util/HazelcastDll.h"
23 #include "hazelcast/client/impl/DistributedObjectInfo.h"
24 #include "hazelcast/client/IDistributedObject.h"
25 
26 #include <string>
27 
28 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
29 #pragma warning(push)
30 #pragma warning(disable: 4251) //for dll export
31 #endif
32 
33 namespace hazelcast {
34  namespace client {
35  namespace impl {
36  class BaseEventHandler;
37 
38  class BaseRemoveListenerRequest;
39 
40  class ClientRequest;
41  }
42 
43  namespace serialization {
44  namespace pimpl {
45  class Data;
46  }
47  }
48 
69  class HAZELCAST_API DistributedObject : public IDistributedObject {
70  friend class HazelcastClient;
71 
72  public:
76  const std::string& getServiceName() const;
77 
83  const std::string& getName() const;
84 
89  virtual void destroy() = 0;
90 
94  virtual ~DistributedObject();
95 
96  protected:
100  DistributedObject(const std::string& serviceName, const std::string& objectName);
101 
105  virtual void onDestroy();
106 
107  impl::DistributedObjectInfo info;
108  };
109 
110  }
111 }
112 
113 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
114 #pragma warning(pop)
115 #endif
116 
117 #endif //HAZELCAST_DistributedObject
118 
Base class for all distributed objects.
Definition: DistributedObject.h:69
Definition: IDistributedObject.h:33
Definition: MapEntryView.h:32
Hazelcast Client enables you to do all Hazelcast operations without being a member of the cluster...
Definition: HazelcastClient.h:459