public void addInstanceDescription()

in src/main/java/org/apache/sling/discovery/commons/providers/DefaultClusterView.java [107:117]


    public void addInstanceDescription(final DefaultInstanceDescription instance) {
        if (instances.contains(instance)) {
            throw new IllegalArgumentException("cannot add same instance twice");
        }
        if (instance.isLeader() && doGetLeader() != null) {
            throw new IllegalArgumentException(
                    "cannot add another leader. there already is one");
        }
        instances.add(instance);
        instance.setClusterView(this);
    }