lib/request/GetRequestV2.js
function(requested, optimized, callback) {
        // uses the length tree complement calculator.
        var self = this;
        var complementResult = complement(requested, optimized, self._pathMap);

        var inserted = false;
        var disposable = false;

        // If we found an intersection, then just add new callback
        // as one of the dependents of that request
        if (complementResult.intersection.length) {
            inserted = true;
            var idx = self._callbacks.length;
            self._callbacks[idx] = callback;
            self._requestedPaths[idx] = complementResult.intersection;
            self._optimizedPaths[idx] = [];
            ++self._count;

            disposable = createDisposable(self, idx);
        }

        return [inserted, complementResult.requestedComplement, complementResult.optimizedComplement, disposable];
    }
function(requested, optimized, callback) {
        // uses the length tree complement calculator.
        var self = this;
        var complementResult = complement(requested, optimized, self._pathMap);

        var inserted = false;
        var disposable = false;

        // If we found an intersection, then just add new callback
        // as one of the dependents of that request
        if (complementResult.intersection.length) {
            inserted = true;
            var idx = self._callbacks.length;
            self._callbacks[idx] = callback;
            self._requestedPaths[idx] = complementResult.intersection;
            self._optimizedPaths[idx] = [];
            ++self._count;

            disposable = createDisposable(self, idx);
        }

        return [inserted, complementResult.requestedComplement, complementResult.optimizedComplement, disposable];
    }
function ( requested , optimized , callback ) { // uses the length tree complement calculator. var self = this ; var complementResult = complement ( requested , optimized , self . _pathMap ) ; var inserted = false ; var disposable = false ; // If we found an intersection, then just add new callback // as one of the dependents of that request if ( complementResult . intersection . length ) { inserted = true ; var idx = self . _callbacks . length ; self . _callbacks [ idx ] = callback ; self . _requestedPaths [ idx ] = complementResult . intersection ; self . _optimizedPaths [ idx ] = [ ] ; ++ self . _count ; disposable = createDisposable ( self , idx ) ; } return [ inserted , complementResult . requestedComplement , complementResult . optimizedComplement , disposable ] ; }
Attempts to add paths to the outgoing request.  If there are added
paths then the request callback will be added to the callback list.
Handles adding partial paths as well

@returns {Array} - whether new requested paths were inserted in this
request, the remaining paths that could not be added,
and disposable for the inserted requested paths.
Attempts to add paths to the outgoing request . If there are added paths then the request callback will be added to the callback list . Handles adding partial paths as well