@@ -123,7 +123,7 @@ ImmutableSortedMap<DocumentKey, Document> getDocuments(Iterable<DocumentKey> key
123
123
* @param existenceStateChanged The set of document keys whose existence state is changed. This is
124
124
* useful to determine if some documents overlay needs to be recalculated.
125
125
*/
126
- ImmutableSortedMap <DocumentKey , Document > getLocalViewOfDocuments (
126
+ private ImmutableSortedMap <DocumentKey , Document > getLocalViewOfDocuments (
127
127
Map <DocumentKey , MutableDocument > docs ,
128
128
Function <DocumentKey , Overlay > overlays ,
129
129
Set <DocumentKey > existenceStateChanged ) {
@@ -153,6 +153,20 @@ ImmutableSortedMap<DocumentKey, Document> getLocalViewOfDocuments(
153
153
return results ;
154
154
}
155
155
156
+ /**
157
+ * Similar to {@link #getDocuments}, but creates the local view from the given {@code baseDocs}
158
+ * without retrieving documents from the local store.
159
+ *
160
+ * @param docs The documents to apply local mutations to get the local views.
161
+ * @param existenceStateChanged The set of document keys whose existence state is changed. This is
162
+ * useful to determine if some documents overlay needs to be recalculated.
163
+ */
164
+ ImmutableSortedMap <DocumentKey , Document > getLocalViewOfDocuments (
165
+ Map <DocumentKey , MutableDocument > docs ,
166
+ Set <DocumentKey > existenceStateChanged ) {
167
+ return getLocalViewOfDocuments (docs , documentOverlayCache ::getOverlay , existenceStateChanged );
168
+ }
169
+
156
170
private void recalculateAndSaveOverlays (Map <DocumentKey , MutableDocument > docs ) {
157
171
List <MutationBatch > batches =
158
172
mutationQueue .getAllMutationBatchesAffectingDocumentKeys (docs .keySet ());
0 commit comments