Example #1
0
 private Node newNode(Integer id, Integer port, String address) {
   Node node;
   node = new Node();
   node.setAddress(address);
   node.setCondition(NodeCondition.ENABLED);
   node.setId(id);
   node.setPort(port);
   node.setStatus(NodeStatus.ONLINE);
   node.setWeight(1);
   return node;
 }
Example #2
0
 public static Node rndNode() {
   Node n = new Node();
   n.setCondition((NodeCondition) rndChoice(NodeCondition.values()));
   n.setId(rndInt(0, 10000));
   n.setAddress(rndIp());
   n.setPort(rndInt(1, 32000));
   n.setStatus((NodeStatus) rndChoice(NodeStatus.values()));
   return n;
 }