Package org.apache.geronimo.datastore.impl.remote.messaging.Topology

Examples of org.apache.geronimo.datastore.impl.remote.messaging.Topology.PathWeight


* @version $Revision: 1.1 $ $Date: 2004/03/11 15:36:13 $
*/
public class TopologyTest extends TestCase {

    public void testGetPath() throws Exception {
        PathWeight weight30 = new PathWeight(30);
        PathWeight weight10 = new PathWeight(10);
       
        Topology topology = new Topology();
        InetAddress address = InetAddress.getLocalHost();
        NodeInfo node1 = new NodeInfo("node1", address, 8080);
        NodeInfo node2 = new NodeInfo("node2", address, 8080);
View Full Code Here


        // The second ServerNode joins the first one.
        node.join(primaryNode);
       
        // Sets the topology.
        Topology topology = new Topology();
        PathWeight weight = new PathWeight(10);
        NodePath path = new NodePath(primaryNode, secondaryNode, weight, weight);
        topology.addPath(path);

        kernel1.setAttribute(node1Name, "Topology", topology);
        kernel2.setAttribute(node2Name, "Topology", topology);
View Full Code Here

        // The fourth ServerNode joins the third one.
        node.join(nodeInfo3);

        // Sets the topology.
        Topology topology = new Topology();
        PathWeight weight = new PathWeight(10);
        NodePath path = new NodePath(nodeInfo1, nodeInfo2, weight, weight);
        topology.addPath(path);
        path = new NodePath(nodeInfo2, nodeInfo3, weight, weight);
        topology.addPath(path);
        path = new NodePath(nodeInfo3, nodeInfo4, weight, weight);
View Full Code Here

        Node node = (Node) node2GB.getTarget();
        // The second ServerNode joins the first one.
        node.join(node1Info);
       
        Topology topology = new Topology();
        PathWeight weight = new PathWeight(10);
        NodePath path = new NodePath(node1Info, node2Info, weight, weight);
        topology.addPath(path);

        kernel1.setAttribute(node1Name, "Topology", topology);
        kernel2.setAttribute(node2Name, "Topology", topology);
View Full Code Here

TOP

Related Classes of org.apache.geronimo.datastore.impl.remote.messaging.Topology.PathWeight

Copyright © 2018 www.massapicom. 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.