congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
CouldNotConnectException.getHost
Code IndexAdd Tabnine to your IDE (free)

How to use
getHost
method
in
io.searchbox.client.config.exception.CouldNotConnectException

Best Java code snippets using io.searchbox.client.config.exception.CouldNotConnectException.getHost (Showing top 5 results out of 315)

origin: searchbox-io/Jest

removeNodeAndUpdateServers(cnce.getHost());
return;
origin: org.opennms.features.jest/org.opennms.features.jest.client

@Override
public <T extends JestResult> T execute(JestClient client, Action<T> clientRequest) {
  do {
    LOG.debug("Executing request {}", clientRequest);
    try {
      T result = client.execute(clientRequest);
      return result;
    } catch (CouldNotConnectException connectException) {
      LOG.error("Could not connect to elastic endpoint: {}", connectException.getHost(), connectException);
    } catch (IOException ex) {
      LOG.error("Could not perform request {}: {}", clientRequest, ex.getMessage(), ex);
    } catch (com.google.gson.JsonSyntaxException gsonException) {
      LOG.error("A Json error occurred: {}", gsonException.getMessage(), gsonException);
    }
    // Retry-Logic
    LOG.debug("Request was not executed properly. Attempting Retry...");
    if (cooldownInMs > 0) {
      LOG.debug("Sleep " + cooldownInMs + " before retrying");
      try {
        Thread.sleep(cooldownInMs);
      } catch (InterruptedException e) {
        throw new RuntimeException("Thread interrupted.", e);
      }
    }
    LOG.debug("Retrying now");
  } while (true);
}
origin: OpenNMS/opennms

@Override
public <T extends JestResult> T execute(JestClient client, Action<T> clientRequest) {
  do {
    LOG.debug("Executing request {}", clientRequest);
    try {
      T result = client.execute(clientRequest);
      return result;
    } catch (CouldNotConnectException connectException) {
      LOG.error("Could not connect to elastic endpoint: {}", connectException.getHost(), connectException);
    } catch (IOException ex) {
      LOG.error("Could not perform request {}: {}", clientRequest, ex.getMessage(), ex);
    } catch (com.google.gson.JsonSyntaxException gsonException) {
      LOG.error("A Json error occurred: {}", gsonException.getMessage(), gsonException);
    }
    // Retry-Logic
    LOG.debug("Request was not executed properly. Attempting Retry...");
    if (cooldownInMs > 0) {
      LOG.debug("Sleep " + cooldownInMs + " before retrying");
      try {
        Thread.sleep(cooldownInMs);
      } catch (InterruptedException e) {
        throw new RuntimeException("Thread interrupted.", e);
      }
    }
    LOG.debug("Retrying now");
  } while (true);
}
origin: io.searchbox/jest-common

removeNodeAndUpdateServers(cnce.getHost());
return;
origin: org.graylog.jest/jest-common

removeNodeAndUpdateServers(cnce.getHost());
return;
io.searchbox.client.config.exceptionCouldNotConnectExceptiongetHost

Popular methods of CouldNotConnectException

  • <init>

Popular in Java

  • Creating JSON documents from java classes using gson
  • getContentResolver (Context)
  • onRequestPermissionsResult (Fragment)
  • getSharedPreferences (Context)
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • JButton (javax.swing)
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Sublime Text for Python
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now