private void initMembershipListener() {
for (MembershipListener membershipListener : listeners.values()) {
if (membershipListener instanceof InitialMembershipListener) {
// TODO: needs sync with membership events...
Cluster cluster = client.getCluster();
InitialMembershipEvent event = new InitialMembershipEvent(cluster, cluster.getMembers());
((InitialMembershipListener) membershipListener).init(event);
}
}
}