- Hands-On Reactive Programming with Reactor
- Rahul Sharma
- 143字
- 2021-08-13 15:22:56
Utility methods
Flux offers methods to generate infinite streams and empty streams, or to convert an existing Reactive Stream publisher to Flux. These methods are required to generate streams that can be combined with other streams, using the available operators, as follows:
- Flux.empty: This method generates an empty stream with no values and only completion.
- Flux.error: This method generates an error stream with no values and only specified errors.
- Flux.never: This method generates a stream with no events at all. It does not generate events of any type.
- Flux.from: This method takes an existing reactive publisher and generates a Flux from it.
- Flux.defer: This method is used to build a lazy reactive publisher. The method takes a Java 8 supplier to instantiate a subscription-specific Reactive Stream publisher. The publisher instance is only generated when a subscriber makes a subscription to the Flux.
推薦閱讀
- AutoCAD快速入門與工程制圖
- Introduction to DevOps with Kubernetes
- 影視后期制作(Avid Media Composer 5.0)
- iClone 4.31 3D Animation Beginner's Guide
- 統(tǒng)計(jì)策略搜索強(qiáng)化學(xué)習(xí)方法及應(yīng)用
- 自動(dòng)生產(chǎn)線的拆裝與調(diào)試
- 大學(xué)C/C++語言程序設(shè)計(jì)基礎(chǔ)
- Nginx高性能Web服務(wù)器詳解
- 網(wǎng)絡(luò)安全管理實(shí)踐
- 計(jì)算智能算法及其生產(chǎn)調(diào)度應(yīng)用
- 大數(shù)據(jù)素質(zhì)讀本
- 計(jì)算機(jī)硬件技術(shù)基礎(chǔ)(第2版)
- Advanced Deep Learning with Keras
- 中老年人學(xué)電腦與上網(wǎng)
- 微計(jì)算機(jī)原理及應(yīng)用