![]() |
Hazelcast C++ Client
Hazelcast C++ Client Library
|
#include <member_selectors.h>
Public Member Functions | |
virtual bool | select (const member &member) const =0 |
Decides if the given member will be part of an operation or not. More... | |
Implementations of this interface select members that are capable of executing a special kind of task.
The select(Member) method is called for every available member in the cluster and it is up to the implementation to decide if the member is going to be used or not.
For example, a basic implementation could select members on the existence of a special attribute in the members, like the following:
class MyMemberSelector : public member_selector { public: bool select(const member &member) override { auto attribute = member.get_attribute("my.special.executor") return attribute != nullptr && *attribute == "my.special.executor"; } }
Definition at line 43 of file member_selectors.h.
|
pure virtual |
Decides if the given member will be part of an operation or not.
member | the member instance to decide upon |