コード例 #1
0
ファイル: ZuFinagleServer.java プロジェクト: javasoze/zu
 public synchronized void joinCluster(ZuCluster cluster, Set<Integer> shards)
     throws JoinException, InterruptedException {
   String clusterId = cluster.getClusterId();
   List<EndpointStatus> endpoints = endpointMap.get(clusterId);
   if (endpoints == null) {
     endpoints = cluster.join(addr, shards);
     endpointMap.put(clusterId, endpoints);
   } else {
     throw new JoinException("cluster " + clusterId + " already joined, leave first", null);
   }
 }