@@ -97,36 +97,6 @@ Document getDocument(DocumentKey key) {
97
97
return fromOverlay ;
98
98
}
99
99
100
- // Internal version of {@code getDocument} that allows reusing batches.
101
- private Document getDocument (DocumentKey key , List <MutationBatch > inBatches ) {
102
- MutableDocument document = remoteDocumentCache .get (key );
103
- for (MutationBatch batch : inBatches ) {
104
- batch .applyToLocalView (document );
105
- }
106
- return document ;
107
- }
108
-
109
- /**
110
- * Applies the given {@code batches} to the given {@code docs}. The docs are updated to reflect
111
- * the contents of the mutations.
112
- *
113
- * <p>Returns a {@link DocumentKey} to {@link FieldMask} map, representing the fields mutated for
114
- * each document. This is useful to build overlays.
115
- */
116
- private Map <DocumentKey , FieldMask > applyLocalMutationsToDocuments (
117
- Map <DocumentKey , MutableDocument > docs , List <MutationBatch > batches ) {
118
- Map <DocumentKey , FieldMask > changedMasks = new HashMap <>();
119
- for (Map .Entry <DocumentKey , MutableDocument > base : docs .entrySet ()) {
120
- FieldMask mask = null ;
121
- for (MutationBatch batch : batches ) {
122
- mask = batch .applyToLocalView (base .getValue (), mask );
123
- }
124
- changedMasks .put (base .getKey (), mask );
125
- }
126
-
127
- return changedMasks ;
128
- }
129
-
130
100
/**
131
101
* Gets the local view of the documents identified by {@code keys}.
132
102
*
@@ -280,9 +250,7 @@ private ImmutableSortedMap<DocumentKey, Document> getDocumentsMatchingCollection
280
250
281
251
private ImmutableSortedMap <DocumentKey , Document > getDocumentsMatchingCollectionQuery (
282
252
Query query , IndexOffset offset ) {
283
- ImmutableSortedMap <DocumentKey , Document > fromOverlay =
284
- getDocumentsMatchingCollectionQueryFromOverlayCache (query , offset );
285
- return fromOverlay ;
253
+ return getDocumentsMatchingCollectionQueryFromOverlayCache (query , offset );
286
254
}
287
255
288
256
/** Queries the remote documents and overlays by doing a full collection scan. */
0 commit comments