コード例 #1
0
 @Override
 public void safeStop() {
   stop = true;
   suss.blockUntilFinished();
   suss.shutdownNow();
   httpClient.getConnectionManager().shutdown();
 }
コード例 #2
0
 private void changeUrlOnError(Exception e) {
   if (e instanceof ConnectException) {
     clientIndex++;
     if (clientIndex > clients.size() - 1) {
       clientIndex = 0;
     }
     suss.shutdownNow();
     suss =
         new ConcurrentUpdateSolrServer(
             ((HttpSolrServer) clients.get(clientIndex)).getBaseURL(), httpClient, 30, 3) {
           @Override
           public void handleError(Throwable ex) {
             log.warn("suss error", ex);
           }
         };
   }
 }