Tabnine Logo
ConnectionException.getHost
Code IndexAdd Tabnine to your IDE (free)

How to use
getHost
method
in
com.netflix.astyanax.connectionpool.exceptions.ConnectionException

Best Java code snippets using com.netflix.astyanax.connectionpool.exceptions.ConnectionException.getHost (Showing top 6 results out of 315)

origin: com.bazaarvoice.astyanax/astyanax-core

  @SuppressWarnings("unchecked")
  public <R> ExecuteWithFailover<CL, R> newExecuteWithFailover(Operation<CL, R> operation) throws ConnectionException {
    try {
      if (operation.getPinnedHost() != null) {
        HostConnectionPool<CL> pool = hosts.get(operation.getPinnedHost());
        if (pool == null) {
          throw new NoAvailableHostsException("Host " + operation.getPinnedHost() + " not active");
        }
        return new RoundRobinExecuteWithFailover<CL, R>(config, monitor,
            Arrays.<HostConnectionPool<CL>> asList(pool), 0);
      }
      
      int index = roundRobinCounter.incrementAndGet();
      if (index > MAX_RR_COUNTER) {
        roundRobinCounter.set(0);
      }
      
      return new RoundRobinExecuteWithFailover<CL, R>(config, monitor, topology.getAllPools().getPools(), index);
    }
    catch (ConnectionException e) {
      monitor.incOperationFailure(e.getHost(), e);
      throw e;
    }
  }
}
origin: com.netflix.astyanax/astyanax-core

  @SuppressWarnings("unchecked")
  public <R> ExecuteWithFailover<CL, R> newExecuteWithFailover(Operation<CL, R> operation) throws ConnectionException {
    try {
      if (operation.getPinnedHost() != null) {
        HostConnectionPool<CL> pool = hosts.get(operation.getPinnedHost());
        if (pool == null) {
          throw new NoAvailableHostsException("Host " + operation.getPinnedHost() + " not active");
        }
        return new RoundRobinExecuteWithFailover<CL, R>(config, monitor,
            Arrays.<HostConnectionPool<CL>> asList(pool), 0);
      }
      
      int index = roundRobinCounter.incrementAndGet();
      if (index > MAX_RR_COUNTER) {
        roundRobinCounter.set(0);
      }
      
      return new RoundRobinExecuteWithFailover<CL, R>(config, monitor, topology.getAllPools().getPools(), index);
    }
    catch (ConnectionException e) {
      monitor.incOperationFailure(e.getHost(), e);
      throw e;
    }
  }
}
origin: com.netflix.astyanax/astyanax-core

monitor.incOperationFailure(e.getHost(), e);
throw e;
origin: com.bazaarvoice.astyanax/astyanax-core

monitor.incOperationFailure(e.getHost(), e);
throw e;
origin: com.bazaarvoice.astyanax/astyanax-core

try {
  informException(ce);
  monitor.incFailover(ce.getHost(), ce);
origin: com.netflix.astyanax/astyanax-core

try {
  informException(ce);
  monitor.incFailover(ce.getHost(), ce);
com.netflix.astyanax.connectionpool.exceptionsConnectionExceptiongetHost

Popular methods of ConnectionException

  • getMessage
  • printStackTrace
  • setHost
  • setLatency
  • setAttempt
  • setLatencyWithPool

Popular in Java

  • Reactive rest calls using spring rest template
  • setRequestProperty (URLConnection)
  • scheduleAtFixedRate (Timer)
  • onRequestPermissionsResult (Fragment)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • JPanel (javax.swing)
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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