diff options
author | Greg Soltis <gsoltis@google.com> | 2018-03-29 08:55:10 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-29 08:55:10 -0700 |
commit | d9b2d312d94387f337c95cb442b828a312bbf18c (patch) | |
tree | 68a0ca0d3ce1380e9d68496907ca6fca8c40d575 /Firestore/Source/Local/FSTMemoryMutationQueue.mm | |
parent | cb1f65dfcf78a6cfc11915c2c5695fa023cf3e09 (diff) |
Remove some usages of FSTWriteGroup (#983)
* FSTMutationQueue no longer needs groups
* Remove write group from mutation queue entirely
* Remove write group from query cache
* Mark groups unused in remote document cache
* Drop write group entirely from remote document cache
* style
* Drop commented-out code
* Drop commented-out code
Diffstat (limited to 'Firestore/Source/Local/FSTMemoryMutationQueue.mm')
-rw-r--r-- | Firestore/Source/Local/FSTMemoryMutationQueue.mm | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/Firestore/Source/Local/FSTMemoryMutationQueue.mm b/Firestore/Source/Local/FSTMemoryMutationQueue.mm index 183a806..5419c8a 100644 --- a/Firestore/Source/Local/FSTMemoryMutationQueue.mm +++ b/Firestore/Source/Local/FSTMemoryMutationQueue.mm @@ -92,7 +92,7 @@ static const NSComparator NumberComparator = ^NSComparisonResult(NSNumber *left, #pragma mark - FSTMutationQueue implementation -- (void)startWithGroup:(FSTWriteGroup *)group { +- (void)start { // Note: The queue may be shutdown / started multiple times, since we maintain the queue for the // duration of the app session in case a user logs out / back in. To behave like the // LevelDB-backed MutationQueue (and accommodate tests that expect as much), we reset nextBatchID @@ -118,9 +118,7 @@ static const NSComparator NumberComparator = ^NSComparisonResult(NSNumber *left, return _highestAcknowledgedBatchID; } -- (void)acknowledgeBatch:(FSTMutationBatch *)batch - streamToken:(nullable NSData *)streamToken - group:(__unused FSTWriteGroup *)group { +- (void)acknowledgeBatch:(FSTMutationBatch *)batch streamToken:(nullable NSData *)streamToken { NSMutableArray<FSTMutationBatch *> *queue = self.queue; FSTBatchID batchID = batch.batchID; @@ -139,13 +137,8 @@ static const NSComparator NumberComparator = ^NSComparisonResult(NSNumber *left, self.lastStreamToken = streamToken; } -- (void)setLastStreamToken:(nullable NSData *)streamToken group:(__unused FSTWriteGroup *)group { - self.lastStreamToken = streamToken; -} - - (FSTMutationBatch *)addMutationBatchWithWriteTime:(FIRTimestamp *)localWriteTime - mutations:(NSArray<FSTMutation *> *)mutations - group:(FSTWriteGroup *)group { + mutations:(NSArray<FSTMutation *> *)mutations { FSTAssert(mutations.count > 0, @"Mutation batches should not be empty"); FSTBatchID batchID = self.nextBatchID; @@ -299,7 +292,7 @@ static const NSComparator NumberComparator = ^NSComparisonResult(NSNumber *left, return result; } -- (void)removeMutationBatches:(NSArray<FSTMutationBatch *> *)batches group:(FSTWriteGroup *)group { +- (void)removeMutationBatches:(NSArray<FSTMutationBatch *> *)batches { NSUInteger batchCount = batches.count; FSTAssert(batchCount > 0, @"Should not remove mutations when none exist."); |