prop.put("result",(result==null)?("Successfully transferred "+knownURLs.size()+" words in "+((System.currentTimeMillis()-starttime)/1000)+" seconds, "+unknownURLEntries+" URL not found"):result);
prop.put("result",(error==null)?("Successfully transferred "+knownURLs.size()+" words in "+((System.currentTimeMillis()-starttime)/1000)+" seconds, "+unknownURLEntries+" URL not found"):"error: "+error);
// we are too busy flushing the ramCache to receive indexes
sb.getLog().logInfo("Rejecting RWIs from peer "+otherPeerName+". We are too busy (wordcachesize="+sb.wordIndex.dhtOutCacheSize()+").");
granted=false;// don't accept more words if there are too many words to flush
result="busy";
pause=300000;
}*/else{
}else{
// we want and can receive indexes
// log value status (currently added to find outOfMemory error
if(sb.getLog().isFine())sb.getLog().logFine("Processing "+indexes.length+" bytes / "+wordc+" words / "+entryc+" entries from "+otherPeerName);
@ -186,7 +179,7 @@ public final class transferRWI {
// finally compose the unknownURL hash list
finalIterator<String>it=unknownURL.iterator();
unknownURLs.ensureCapacity(unknownURL.size()*13);
unknownURLs.ensureCapacity(unknownURL.size()*25);
while(it.hasNext()){
unknownURLs.append(",").append(it.next());
}
@ -200,9 +193,7 @@ public final class transferRWI {
}
result="ok";
if(checkLimit){
pause=(sb.webIndex.indexCacheSize()<500)?0:sb.webIndex.indexCacheSize();// estimation of necessary pause time
}
pause=(int)(sb.webIndex.indexCacheSize()*20000/sb.getConfigLong(plasmaSwitchboardConstants.WORDCACHE_MAX_COUNT,100000));// estimation of necessary pause time