Node node = (Node) node2GB.getTarget();
// 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);
}