October 2018
Intermediate to advanced
556 pages
15h 18m
English
The Spring Data MongoDB Reactive module has only one implementation of the ReactiveMongoRepository interface, namely the SimpleReactiveMongoRepository class. It provides implementations for all methods of ReactiveMongoRepository and uses the ReactiveMongoOperations interface for handling all the operations at the lower level.
Let's look at the findAllById(Publisher<ID> ids) method implementation:
public Flux<T> findAllById(Publisher<ID> ids) { return Flux.from(ids).buffer().flatMap(this::findAllById); }
It is evident that this method gathers all the ids with the buffer operation and then makes one request using the findAllById(Iterable<ID> ids) override of the method. That method, in turn, ...