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

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

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

origin: com.netflix.astyanax/astyanax-core

  private void informException(ConnectionException connectionException) throws ConnectionException {
    connectionException
      .setHost(getCurrentHost())
      .setLatency(System.currentTimeMillis() - startTime)
      .setAttempt(this.attemptCounter)
      .setLatencyWithPool(System.currentTimeMillis() - poolStartTime);

    if (connectionException instanceof IsRetryableException) {
      if (!canRetry()) {
        throw connectionException;
      }
    }
    else {
      // Most likely an operation error
      throw connectionException;
    }
  }        
}
origin: com.netflix.astyanax/astyanax-core

  .setLatency(System.currentTimeMillis() - startTime);
throw new InterruptedOperationException("Thread interrupted waiting for connection")
  .setHost(getHost())
  .setLatency(System.currentTimeMillis() - startTime);
origin: com.bazaarvoice.astyanax/astyanax-core

  .setLatency(System.currentTimeMillis() - startTime);
throw new InterruptedOperationException("Thread interrupted waiting for connection")
  .setHost(getHost())
  .setLatency(System.currentTimeMillis() - startTime);
origin: com.bazaarvoice.astyanax/astyanax-core

  private void informException(ConnectionException connectionException) throws ConnectionException {
    connectionException
      .setHost(getCurrentHost())
      .setLatency(System.currentTimeMillis() - startTime)
      .setAttempt(this.attemptCounter)
      .setLatencyWithPool(System.currentTimeMillis() - poolStartTime);

    if (connectionException instanceof IsRetryableException) {
      if (!canRetry()) {
        throw connectionException;
      }
    }
    else {
      // Most likely an operation error
      throw connectionException;
    }
  }        
}
origin: com.bazaarvoice.astyanax/astyanax-core

throw new PoolTimeoutException("Fast fail waiting for connection from pool")
    .setHost(getHost())
    .setLatency(System.currentTimeMillis() - startTime);
origin: com.netflix.astyanax/astyanax-core

throw new PoolTimeoutException("Fast fail waiting for connection from pool")
    .setHost(getHost())
    .setLatency(System.currentTimeMillis() - startTime);
origin: com.bazaarvoice.astyanax/astyanax-core

else 
  connectionException = (ConnectionException)e;
connectionException.setLatency(latency);
origin: com.netflix.astyanax/astyanax-core

else 
  connectionException = (ConnectionException)e;
connectionException.setLatency(latency);
origin: com.netflix.astyanax/astyanax-thrift

  long now = System.nanoTime();
  latency = now - startTime;
  lastException = ThriftConverter.ToConnectionPoolException(e).setLatency(latency);
  if (e instanceof IsTimeoutException) {
    pool.addLatencySample(TimeUnit.NANOSECONDS.convert(cpConfig.getSocketTimeout(), TimeUnit.MILLISECONDS), now);
long now = System.nanoTime();
latency = now - startTime;
lastException = ThriftConverter.ToConnectionPoolException(e).setLatency(latency);
if (e instanceof IsTimeoutException) {
  pool.addLatencySample(TimeUnit.NANOSECONDS.convert(cpConfig.getSocketTimeout(), TimeUnit.MILLISECONDS), now);
origin: com.bazaarvoice.astyanax/astyanax-thrift

  long now = System.nanoTime();
  latency = now - startTime;
  lastException = ThriftConverter.ToConnectionPoolException(e).setLatency(latency);
  if (e instanceof IsTimeoutException) {
    pool.addLatencySample(TimeUnit.NANOSECONDS.convert(cpConfig.getSocketTimeout(), TimeUnit.MILLISECONDS), now);
long now = System.nanoTime();
latency = now - startTime;
lastException = ThriftConverter.ToConnectionPoolException(e).setLatency(latency);
if (e instanceof IsTimeoutException) {
  pool.addLatencySample(TimeUnit.NANOSECONDS.convert(cpConfig.getSocketTimeout(), TimeUnit.MILLISECONDS), now);
origin: com.bazaarvoice.astyanax/astyanax-thrift

closeClient();
ConnectionException ce = ThriftConverter.ToConnectionPoolException(e).setHost(getHost())
    .setLatency(System.currentTimeMillis() - startTime);
monitor.incConnectionCreateFailed(getHost(), ce);
throw ce;
closeClient();
ConnectionException ce = ThriftConverter.ToConnectionPoolException(new RuntimeException("Error openning connection", t)).setHost(getHost())
    .setLatency(System.currentTimeMillis() - startTime);
monitor.incConnectionCreateFailed(getHost(), ce);
throw ce;
origin: com.netflix.astyanax/astyanax-thrift

closeClient();
ConnectionException ce = ThriftConverter.ToConnectionPoolException(e).setHost(getHost())
    .setLatency(System.currentTimeMillis() - startTime);
monitor.incConnectionCreateFailed(getHost(), ce);
throw ce;
closeClient();
ConnectionException ce = ThriftConverter.ToConnectionPoolException(new RuntimeException("Error openning connection", t)).setHost(getHost())
    .setLatency(System.currentTimeMillis() - startTime);
monitor.incConnectionCreateFailed(getHost(), ce);
throw ce;
com.netflix.astyanax.connectionpool.exceptionsConnectionExceptionsetLatency

Popular methods of ConnectionException

  • getMessage
  • printStackTrace
  • setHost
  • getHost
  • setAttempt
  • setLatencyWithPool

Popular in Java

  • Creating JSON documents from java classes using gson
  • getContentResolver (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • getSupportFragmentManager (FragmentActivity)
  • Kernel (java.awt.image)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • JTable (javax.swing)
  • Top plugins for Android Studio
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