Package freenet.node.NodeStats

Examples of freenet.node.NodeStats.RunningRequestsSnapshot


      PeerLoadStats loadStats;
      synchronized(routedToLock) {
        if(lastIncomingLoadStats == null) return null;
        loadStats = lastIncomingLoadStats;
      }
      RunningRequestsSnapshot runningRequests = node.nodeStats.getRunningRequestsTo(PeerNode.this, loadStats.averageTransfersOutPerInsert, realTime);
      RunningRequestsSnapshot otherRunningRequests = loadStats.getOtherRunningRequests();
      boolean ignoreLocalVsRemoteBandwidthLiability = node.nodeStats.ignoreLocalVsRemoteBandwidthLiability();
      return new IncomingLoadSummaryStats(runningRequests.totalRequests(),
          loadStats.outputBandwidthPeerLimit, loadStats.inputBandwidthPeerLimit,
          loadStats.outputBandwidthUpperLimit, loadStats.inputBandwidthUpperLimit,
          runningRequests.calculate(ignoreLocalVsRemoteBandwidthLiability, false),
          runningRequests.calculate(ignoreLocalVsRemoteBandwidthLiability, true),
          otherRunningRequests.calculate(ignoreLocalVsRemoteBandwidthLiability, false),
          otherRunningRequests.calculate(ignoreLocalVsRemoteBandwidthLiability, true));
    }
View Full Code Here


          } else return null;
        }
        if(dontSendUnlessGuaranteed)
          worstAcceptable = RequestLikelyAcceptedState.GUARANTEED;
        // Requests already running to this node
        RunningRequestsSnapshot runningRequests = node.nodeStats.getRunningRequestsTo(PeerNode.this, loadStats.averageTransfersOutPerInsert, realTime);
        runningRequests.log(PeerNode.this);
        // Requests running from its other peers
        RunningRequestsSnapshot otherRunningRequests = loadStats.getOtherRunningRequests();
        RequestLikelyAcceptedState acceptState = getRequestLikelyAcceptedState(runningRequests, otherRunningRequests, ignoreLocalVsRemote, loadStats);
        if(logMINOR) Logger.minor(this, "Predicted acceptance state for request: "+acceptState+" must beat "+worstAcceptable);
        if(acceptState.ordinal() > worstAcceptable.ordinal()) return null;
        if(tag.addRoutedTo(PeerNode.this, offeredKey))
          return acceptState;
View Full Code Here

              continue;
            }
            if(logMINOR) Logger.minor(this, "Checking slot waiters for "+type);
            foundNone = false;
            // Requests already running to this node
            RunningRequestsSnapshot runningRequests = node.nodeStats.getRunningRequestsTo(PeerNode.this, loadStats.averageTransfersOutPerInsert, realTime);
            runningRequests.log(PeerNode.this);
            // Requests running from its other peers
            RunningRequestsSnapshot otherRunningRequests = loadStats.getOtherRunningRequests();
            acceptState = getRequestLikelyAcceptedState(runningRequests, otherRunningRequests, ignoreLocalVsRemote, loadStats);
            if(acceptState == null || acceptState == RequestLikelyAcceptedState.UNLIKELY) {
              if(logMINOR) Logger.minor(this, "Accept state is "+acceptState+" - not waking up - type is "+type);
              return;
            }
View Full Code Here

TOP

Related Classes of freenet.node.NodeStats.RunningRequestsSnapshot

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.