Package freenet.node.NodeStats

Examples of freenet.node.NodeStats.RejectReason


//          // For now we'll just have a fixed number.
//          // This should partially address the problem.
//          // Note that while waitFor() is blocking, we need such a limit anyway.
//          if(localRequestsWaitingForSlots > maxWaitingForSlots) continue;
//        }
        RejectReason reason;
        assert(req.realTimeFlag == realTime);
        if(LOCAL_REQUESTS_COMPETE_FAIRLY && !req.localRequestOnly) {
          reason = stats.shouldRejectRequest(true, isInsert, isSSK, true, false, null, false,
              Node.PREFER_INSERT_DEFAULT && isInsert, req.realTimeFlag, null);
          if(reason != null) {
View Full Code Here


      if(logMINOR) Logger.minor(this, "Locked "+uid);
    }
    boolean needPubKey;
    try {
    needPubKey = m.getBoolean(DMT.NEED_PUB_KEY);
    RejectReason reject =
      nodeStats.shouldRejectRequest(true, false, isSSK, false, true, source, false, false, realTimeFlag, tag);
    if(reject != null) {
      Logger.normal(this, "Rejecting FNPGetOfferedKey from "+source+" for "+key+" : "+reject);
      Message rejected = DMT.createFNPRejectedOverload(uid, true, true, realTimeFlag);
      if(reject.soft)
View Full Code Here

    BlockMetadata meta = new BlockMetadata();
    KeyBlock block = node.fetch(key, false, false, false, false, meta);
    if(block != null)
      tag.setNotRoutedOnwards();
   
    RejectReason rejectReason = nodeStats.shouldRejectRequest(!isSSK, false, isSSK, false, false, source, block != null, false, realTimeFlag, tag);
    if(rejectReason != null) {
      // can accept 1 CHK request every so often, but not with SSKs because they aren't throttled so won't sort out bwlimitDelayTime, which was the whole reason for accepting them when overloaded...
      Logger.normal(this, "Rejecting "+(isSSK ? "SSK" : "CHK")+" request from "+source.getPeer()+" preemptively because "+rejectReason);
      Message rejected = DMT.createFNPRejectedOverload(id, true, true, realTimeFlag);
      if(rejectReason.soft)
View Full Code Here

      ignoreLowBackoff = lowBackoff.getBoolean(DMT.IGNORE_LOW_BACKOFF);
    Message preference = m.getSubMessage(DMT.FNPSubInsertPreferInsert);
    if(preference != null)
      preferInsert = preference.getBoolean(DMT.PREFER_INSERT);
    // SSKs don't fix bwlimitDelayTime so shouldn't be accepted when overloaded.
    RejectReason rejectReason = nodeStats.shouldRejectRequest(!isSSK, true, isSSK, false, false, source, false, preferInsert, realTimeFlag, tag);
    if(rejectReason != null) {
      Logger.normal(this, "Rejecting insert from "+source.getPeer()+" preemptively because "+rejectReason);
      Message rejected = DMT.createFNPRejectedOverload(id, true, true, realTimeFlag);
      if(rejectReason.soft)
        rejected.addSubMessage(DMT.createFNPRejectIsSoft());
View Full Code Here

TOP

Related Classes of freenet.node.NodeStats.RejectReason

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.