Package com.google.code.http4j.utils

Examples of com.google.code.http4j.utils.Timer


  @Override
  public final Connection acquire(Host host) throws InterruptedException, IOException {
    if(!shutdown.get()) {
      increaseUsed(host);
      Timer blockingTimer = ThreadLocalMetricsRecorder.getInstance().getBlockingTimer();
      blockingTimer.start();
      Connection connection = getConnection(host);
      blockingTimer.stop();
      return connection;
    }
    return null;
  }
View Full Code Here


    return new Socket();
  }

  @Override
  public final void connect() throws IOException {
    Timer timer = ThreadLocalMetricsRecorder.getInstance().getConnectionTimer();
    timer.start();
    doConnect();
    timer.stop();
  }
View Full Code Here

TOP

Related Classes of com.google.code.http4j.utils.Timer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.