private void setEntityRelevant(String clientId, EntityRef entityRef, boolean relevant) {
            if (relevant) {
                if (relevantEntities.add(entityRef)) {
                    for (ClientEntityRelevancyRuleListener listener : listeners) {
                        listener.entityRelevancyChanged(clientId, Collections.singleton(entityRef));
                    }
                }
            } else {
                if (relevantEntities.remove(entityRef)) {
                    for (ClientEntityRelevancyRuleListener listener : listeners) {
                        listener.entityRelevancyChanged(clientId, Collections.singleton(entityRef));
                    }
                }
            }
        }