com.hazelcast.core
Interface MemberSelector


public interface MemberSelector

Implementations of this interface are thought to 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's up to the implementation to decide if the member is going to be used or not.

A basic implementation for example could select members on existence of a special attribute in the members like the following example show:

public class MyMemberSelector implements MemberSelector {
     public boolean select(Member member) {
         return Boolean.TRUE.equals(member.getAttribute("my.special.executor"));
     }
 }


Method Summary
 boolean select(Member member)
          Decides for the given member to be part of an operation or not.
 

Method Detail

select

boolean select(Member member)
Decides for the given member to be part of an operation or not.

Parameters:
member - the member instance to decide on
Returns:
true of member should take part in the operation otherwise false


Copyright © 2014 Hazelcast, Inc.. All Rights Reserved.