this.averageTransfersPerInsert = transfersPerInsert;
this.realTimeFlag = realTimeFlag;
// We are calculating what part of their resources we use. Therefore, we have
// to see it from their point of view - meaning all the requests are remote.
if(requestsToNode) ignoreLocalVsRemote = true;
CountedRequests countCHK = new CountedRequests();
CountedRequests countSSK = new CountedRequests();
CountedRequests countCHKSR = null;
CountedRequests countSSKSR = null;
if(!requestsToNode) {
// No point counting if it's requests to the node.
// Restarted only matters for requests from a node.
countCHKSR = new CountedRequests();
countSSKSR = new CountedRequests();
}
tracker.countRequests(source, requestsToNode, true, false, false, false, realTimeFlag, transfersPerInsert, ignoreLocalVsRemote, countCHK, countCHKSR);
tracker.countRequests(source, requestsToNode, true, true, false, false, realTimeFlag, transfersPerInsert, ignoreLocalVsRemote, countSSK, countSSKSR);
tracker.countRequests(source, requestsToNode, true, false, true, false, realTimeFlag, transfersPerInsert, ignoreLocalVsRemote, countCHK, countCHKSR);
tracker.countRequests(source, requestsToNode, true, true, true, false, realTimeFlag, transfersPerInsert, ignoreLocalVsRemote, countSSK, countSSKSR);
tracker.countRequests(source, requestsToNode, false, false, false, false, realTimeFlag, transfersPerInsert, ignoreLocalVsRemote, countCHK, countCHKSR);
tracker.countRequests(source, requestsToNode, false, true, false, false, realTimeFlag, transfersPerInsert, ignoreLocalVsRemote, countSSK, countSSKSR);
tracker.countRequests(source, requestsToNode, false, false, true, false, realTimeFlag, transfersPerInsert, ignoreLocalVsRemote, countCHK, countCHKSR);
tracker.countRequests(source, requestsToNode, false, true, true, false, realTimeFlag, transfersPerInsert, ignoreLocalVsRemote, countSSK, countSSKSR);
tracker.countRequests(source, requestsToNode, false, false, false, true, realTimeFlag, transfersPerInsert, ignoreLocalVsRemote, countCHK, countCHKSR);
tracker.countRequests(source, requestsToNode, false, true, false, true, realTimeFlag, transfersPerInsert, ignoreLocalVsRemote, countSSK, countSSKSR);
if(!requestsToNode) {
this.expectedTransfersInCHKSR = countCHKSR.expectedTransfersIn();
this.expectedTransfersInSSKSR = countSSKSR.expectedTransfersIn();
this.expectedTransfersOutCHKSR = countCHKSR.expectedTransfersOut();
this.expectedTransfersOutSSKSR = countSSKSR.expectedTransfersOut();
this.totalRequestsSR = countCHKSR.total() + countSSKSR.total();
this.expectedTransfersInCHK = countCHK.expectedTransfersIn() - expectedTransfersInCHKSR;
this.expectedTransfersInSSK = countSSK.expectedTransfersIn() - expectedTransfersInSSKSR;
this.expectedTransfersOutCHK = countCHK.expectedTransfersOut() - expectedTransfersOutCHKSR;
this.expectedTransfersOutSSK = countSSK.expectedTransfersOut() - expectedTransfersOutSSKSR;
this.totalRequests = (countCHK.total() + countSSK.total()) - totalRequestsSR;