- 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.
推薦閱讀
- Getting Started with Containerization
- Effective DevOps with AWS
- Mastering Elastic Stack
- RPA(機器人流程自動化)快速入門:基于Blue Prism
- AI 3.0
- 可編程序控制器應用實訓(三菱機型)
- Implementing AWS:Design,Build,and Manage your Infrastructure
- Kubernetes for Serverless Applications
- 大數(shù)據(jù)技術(shù)基礎(chǔ):基于Hadoop與Spark
- 電腦上網(wǎng)輕松入門
- 中國戰(zhàn)略性新興產(chǎn)業(yè)研究與發(fā)展·增材制造
- Microsoft Dynamics CRM 2013 Marketing Automation
- 工業(yè)機器人集成應用
- Data Analysis with R(Second Edition)
- 中老年人學電腦與上網(wǎng)