Examples of Assimilation


Examples of tahrir.io.net.TrPeerManager.TrPeerInfo.Assimilation

  public void reportAssimilationFailure(final PhysicalNetworkLocation addr) {
    updatePeerInfo(addr, new Function<TrPeerManager.TrPeerInfo, Void>() {

      public Void apply(final TrPeerInfo peerInfo) {
        final Assimilation a = peerInfo.assimilation;
        a.successRate.sample(false);
        a.lastFailureTime = System.currentTimeMillis();
        // If we've tried it three times, and it failed more than half
        // the time, let's get rid of it
        if (a.successRate.total > 3 && a.successRate.get() < 0.5) {
View Full Code Here

Examples of tahrir.io.net.TrPeerManager.TrPeerInfo.Assimilation

  public void reportAssimilationSuccess(final PhysicalNetworkLocation addr, final long timeMS) {
    updatePeerInfo(addr, new Function<TrPeerManager.TrPeerInfo, Void>() {

      public Void apply(final TrPeerInfo peerInfo) {
        final Assimilation a = peerInfo.assimilation;
        a.successRate.sample(true);
        a.successTimeSqrt.sample(Math.sqrt(timeMS));
        return null;
      }
    });
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.