code: function(updates){                                                                              // 1315
      var self = this;                                                                                              // 1316
                                                                                                                    // 1317
      if (self._resetStores || !_.isEmpty(updates)) {                                                               // 1318
        // Begin a transactional update of each store.                                                              // 1319
        _.each(self._stores, function (s, storeName) {                                                              // 1320
          s.beginUpdate(_.has(updates, storeName) ? updates[storeName].length : 0,                                  // 1321
                        self._resetStores);                                                                         // 1322
        });                                                                                                         // 1323
        self._resetStores = false;                                                                                  // 1324
                                                                                                                    // 1325
        _.each(updates, function (updateMessages, storeName) {                                                      // 1326
          var store = self._stores[storeName];                                                                      // 1327
          if (store) {                                                                                              // 1328
            _.each(updateMessages, function (updateMessage) {                                                       // 1329
              store.update(updateMessage);                                                                          // 1330
            });                                                                                                     // 1331
          } else {                                                                                                  // 1332
            // Nobody's listening for this data. Queue it up until                                                  // 1333
            // someone wants it.                                                                                    // 1334
            // XXX memory use will grow without bound if you forget to                                              // 1335
            // create a collection or just don't care about it... going                                             // 1336
            // to have to do something about that.                                                                  // 1337
            if (!_.has(self._updatesForUnknownStores, storeName))                                                   // 1338
              self._updatesForUnknownStores[storeName] = [];                                                        // 1339
            Array.prototype.push.apply(self._updatesForUnknownStores[storeName],                                    // 1340
                                       updateMessages);                                                             // 1341
          }                                                                                                         // 1342
        });                                                                                                         // 1343
                                                                                                                    // 1344
        // End update transaction.                                                                                  // 1345
        _.each(self._stores, function (s) { s.endUpdate(); });                                                      // 1346
      }                                                                                                             // 1347
                                                                                                                    // 1348
      self._runAfterUpdateCallbacks();                                                                              // 1349
    }
docs: 1313 1314