try {
// re-check the state; another thread might have acquired the write lock and modified
if (cluster.memberExists(memberTerminatedEvent.getMemberId())) {
// remove the member from the cluster
Member terminatedMember = cluster.getMember(memberTerminatedEvent.getMemberId());
cluster.removeMember(terminatedMember);
if (log.isDebugEnabled()) {
log.debug("Removed the terminated member with id " + memberTerminatedEvent.getMemberId() + " from the cluster");
}
}