Hazelcast C++ Client
MemberAttributeEvent.h
1 /*
2  * Copyright (c) 2008-2019, 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 28/01/14.
18 //
19 
20 #ifndef HAZELCAST_MemberAttributeEvent
21 #define HAZELCAST_MemberAttributeEvent
22 
23 #include <vector>
24 
25 #include "hazelcast/client/MembershipEvent.h"
26 
27 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
28 #pragma warning(push)
29 #pragma warning(disable: 4251) //for dll export
30 #endif
31 
32 namespace hazelcast {
33  namespace client {
34 
35  class Cluster;
36 
41  class HAZELCAST_API MemberAttributeEvent : public MembershipEvent {
42  public:
48  PUT = 1,
49  REMOVE = 2
50  };
51 
55  MemberAttributeEvent(Cluster &cluster, const Member &member, MemberAttributeOperationType operationType,
56  const std::string &key, const std::string &value);
57 
66  MemberAttributeOperationType getOperationType() const;
67 
71  const std::string &getKey() const;
72 
79  const std::string &getValue() const;
80 
81  private:
82  Member member;
83  MemberAttributeOperationType operationType;
84  std::string key;
85  std::string value;
86  std::vector<Member> members;
87  };
88 
89  }
90 }
91 
92 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
93 #pragma warning(pop)
94 #endif
95 
96 #endif //HAZELCAST_MemberAttributeEvent
97 
Definition: MemberAttributeEvent.h:41
Membership event fired when a new member is added to the cluster and/or when a member leaves the clus...
Definition: MembershipEvent.h:42
Hazelcast cluster interface.
Definition: Cluster.h:40
Cluster member class.
Definition: Member.h:43
MemberAttributeOperationType
PUT even type representing an addition of an attribute REMOVE event type representing a deletion of a...
Definition: MemberAttributeEvent.h:47
PN (Positive-Negative) CRDT counter.
Definition: MapEntryView.h:32