Examples of peerLimit()


Examples of freenet.node.NodeStats.PeerLoadStats.peerLimit()

  public boolean isLowCapacity(boolean isRealtime) {
    PeerLoadStats stats = outputLoadTracker(isRealtime).getLastIncomingLoadStats();
    if(stats == null) return false;
    NodePinger pinger = node.nodeStats.nodePinger;
    if(pinger == null) return false; // FIXME possible?
    if(pinger.capacityThreshold(isRealtime, true) > stats.peerLimit(true)) return true;
    if(pinger.capacityThreshold(isRealtime, false) > stats.peerLimit(false)) return true;
    return false;
  }

  public void reportRoutedTo(double target, boolean isLocal, boolean realTime, PeerNode prev, Set<PeerNode> routedTo) {
View Full Code Here

Examples of freenet.node.NodeStats.PeerLoadStats.peerLimit()

    PeerLoadStats stats = outputLoadTracker(isRealtime).getLastIncomingLoadStats();
    if(stats == null) return false;
    NodePinger pinger = node.nodeStats.nodePinger;
    if(pinger == null) return false; // FIXME possible?
    if(pinger.capacityThreshold(isRealtime, true) > stats.peerLimit(true)) return true;
    if(pinger.capacityThreshold(isRealtime, false) > stats.peerLimit(false)) return true;
    return false;
  }

  public void reportRoutedTo(double target, boolean isLocal, boolean realTime, PeerNode prev, Set<PeerNode> routedTo) {
    double distance = Location.distance(target, getLocation());
View Full Code Here

Examples of freenet.node.NodeStats.PeerLoadStats.peerLimit()

      double[] allPeers = new double[peers.length];
      int x = 0;
      for(PeerNode peer : peers) {
        PeerLoadStats stats = peer.outputLoadTracker(isRealtime).getLastIncomingLoadStats();
        if(stats == null) continue;
        allPeers[x++] = stats.peerLimit(isInput);
      }
      if(x != peers.length) {
        allPeers = Arrays.copyOf(allPeers, x);
      }
      Arrays.sort(allPeers);
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.