Hazelcast C++ Client
Hazelcast C++ Client Library
hazelcast::client::member_selector Class Referenceabstract

#include <member_selectors.h>

+ Inheritance diagram for hazelcast::client::member_selector:

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...
 

Detailed Description

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.

Member Function Documentation

◆ select()

virtual bool hazelcast::client::member_selector::select ( const member member) const
pure virtual

Decides if the given member will be part of an operation or not.

Parameters
memberthe member instance to decide upon
Returns
true if the member should take part in the operation, false otherwise

The documentation for this class was generated from the following file: