Hazelcast C++ Client
 All Classes Functions Variables Enumerations Pages
MemberAttributeEvent.h
1 /*
2  * Copyright (c) 2008-2015, 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 
21 #ifndef HAZELCAST_MemberAttributeEvent
22 #define HAZELCAST_MemberAttributeEvent
23 
24 
25 #include "hazelcast/client/MembershipEvent.h"
26 #include "hazelcast/util/IOUtil.h"
27 #include <boost/smart_ptr/shared_ptr.hpp>
28 
29 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
30 #pragma warning(push)
31 #pragma warning(disable: 4251) //for dll export
32 #endif
33 
34 namespace hazelcast {
35  namespace client {
36 
37  class Cluster;
38 
39  class Member;
40 
45  class HAZELCAST_API MemberAttributeEvent : public MembershipEvent {
46  public:
52  PUT = 1,
53  REMOVE = 2
54  };
55 
59  MemberAttributeEvent(Cluster &cluster, const Member &member, MemberAttributeOperationType operationType,
60  const std::string &key, std::string &value, const std::vector<Member> &memberList);
61 
70  MemberAttributeOperationType getOperationType() const;
71 
75  const std::string &getKey() const;
76 
83  const std::string &getValue() const;
84 
85  private:
86  Member member;
87  MemberAttributeOperationType operationType;
88  std::string key;
89  std::string value;
90  std::vector<Member> members;
91  };
92 
93  }
94 }
95 
96 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
97 #pragma warning(pop)
98 #endif
99 
100 #endif //HAZELCAST_MemberAttributeEvent
101 
Definition: MemberAttributeEvent.h:45
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:44
MemberAttributeOperationType
PUT even type representing an addition of an attribute REMOVE event type representing a deletion of a...
Definition: MemberAttributeEvent.h:51