Açıklaması şöyle
The merge operator combines elements from multiple streams into a single stream, interleaving elements as they arrive. The concat operator, on the other hand, concatenates the streams one after another.
Örnek
Şöyle yaparız
Flux<Integer> flux1 = Flux.just(1, 2, 3);Flux<Integer> flux2 = Flux.just(4, 5, 6);Flux<Integer> mergedFlux = Flux.merge(flux1, flux2); // interleavedFlux<Integer> concatenatedFlux = Flux.concat(flux1, flux2); // in order
Hiç yorum yok:
Yorum Gönder