Create a "bootstrap" cluster using the given list of host/ports @param addresses The addresses @return A cluster for these hosts/ports
(List<InetSocketAddress> addresses)
| 84 | * @return A cluster for these hosts/ports |
| 85 | */ |
| 86 | public static Cluster bootstrap(List<InetSocketAddress> addresses) { |
| 87 | List<Node> nodes = new ArrayList<Node>(); |
| 88 | int nodeId = -1; |
| 89 | for (InetSocketAddress address : addresses) |
| 90 | nodes.add(new Node(nodeId--, address.getHostName(), address.getPort())); |
| 91 | return new Cluster(nodes, new ArrayList<PartitionInfo>(0)); |
| 92 | } |
| 93 | |
| 94 | /** |
| 95 | * @return The known set of nodes |
no test coverage detected