protected void coordinatorChanged(Node node) {
ClusterEvent event = new ClusterEvent(cluster, node, ClusterEvent.ELECTED_COORDINATOR);
// lets take a copy to make contention easier
Object[] array = listeners.toArray();
for (int i = 0, size = array.length; i < size; i++) {
ClusterListener listener = (ClusterListener) array[i];
listener.onCoordinatorChanged(event);
}
}