Examples of addInstanceDescription()


Examples of org.apache.sling.discovery.impl.common.DefaultClusterViewImpl.addInstanceDescription()

        DefaultClusterViewImpl c = new DefaultClusterViewImpl(original.getId());
        Iterator<InstanceDescription> it = original.getInstances().iterator();
        while (it.hasNext()) {
            DefaultInstanceDescriptionImpl id = (DefaultInstanceDescriptionImpl) it
                    .next();
            c.addInstanceDescription(cloneWOClusterView(id));
        }
        return c;
    }

    public static DefaultInstanceDescriptionImpl cloneWOClusterView(
View Full Code Here

Examples of org.apache.sling.discovery.impl.common.DefaultClusterViewImpl.addInstanceDescription()

                obj.getString("id"));
        JSONArray instancesObj = obj.getJSONArray("instances");

        for (int i = 0; i < instancesObj.length(); i++) {
            JSONObject anInstance = instancesObj.getJSONObject(i);
            clusterView.addInstanceDescription(asInstance(anInstance));
        }

        return clusterView;
    }
View Full Code Here

Examples of org.apache.sling.discovery.impl.common.DefaultClusterViewImpl.addInstanceDescription()

        assertNotNull(secondInstance);
        TopologyTestHelper.getWriteableProperties(
                firstInstance).put("c", "d");
        DefaultClusterViewImpl cluster = new DefaultClusterViewImpl(UUID.randomUUID().toString());
        PrivateAccessor.setField(secondInstance, "clusterView", null);
        cluster.addInstanceDescription(secondInstance);
        assertEquals(Type.TOPOLOGY_CHANGED, newView.compareTopology(oldView));
    }

    @Test
    public void testFind() throws Exception {
View Full Code Here

Examples of org.apache.sling.discovery.impl.common.DefaultClusterViewImpl.addInstanceDescription()

            final String slingId) {
        super(null, res, slingId, true, true);

        DefaultClusterViewImpl clusterView = new DefaultClusterViewImpl(
                clusterViewId);
        clusterView.addInstanceDescription(this);
    }

}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.