当前位置:网站首页>Powerful tool for collection processing
Powerful tool for collection processing
2022-07-05 18:39:00 【InfoQ】
Why Stream
Stream Detailed explanation

- Intermediate operation
- No state : It means that the element is not affected by the previous element , There is no association between elements
- A stateful : Stateful intermediate operations must wait until all elements are processed before the final result is known
- Termination operation
- Short circuit operation : You can return results without processing all the elements
- Non short circuit operation : All elements must be processed to get the final result
Stream principle
- How to record user actions
- How operations stack
- How to perform the superimposed operation
How the operation records


How operations stack
- First begin() The method tells Slink The number of elements participating in the operation , It is convenient to determine the size of the intermediate result container
- After through accept() Method to add elements to the intermediate results , At the end of execution, the caller will call the method continuously , Until you go through all the elements
- Last end() The method tells Slink All elements are traversed , Start the corresponding operation steps , After the operation is completed, the result is passed to the downstream Slink
- If the downstream Slink Time short circuit operation , Ask constantly when passing the results to the downstream cancellationrequested() Whether the processing can be ended
How to execute the operation after stacking
Sink AbstractPipeline.opWrapSink(int flags, Sink downstream)边栏推荐
- [PM2 details]
- [paddlepaddle] paddedetection face recognition custom data set
- 开户注册股票炒股安全吗?有没有风险的?靠谱吗?
- A2L file parsing based on CAN bus (3)
- Various pits of vs2017 QT
- Solutions contents have differences only in line separators
- Sibling components carry out value transfer (there is a sequence displayed)
- Maximum artificial island [how to make all nodes of a connected component record the total number of nodes? + number the connected component]
- The 11th China cloud computing standards and Applications Conference | cloud computing national standards and white paper series release, and Huayun data fully participated in the preparation
- 【在優麒麟上使用Electron開發桌面應】
猜你喜欢

【Autosar 十四 启动流程详解】

LeetCode 6109. Number of people who know the secret

Tupu software digital twin | visual management system based on BIM Technology

Pytorch yolov5 training custom data

Share: ZTE Yuanhang 30 Pro root unlock BL magick ZTE 7532n 8040n 9041n brush mask original brush package root method Download

记录Pytorch中的eval()和no_grad()

Failed to virtualize table with JMeter

The 2022 China Xinchuang Ecological Market Research and model selection evaluation report released that Huayun data was selected as the mainstream manufacturer of Xinchuang IT infrastructure!

第十一届中国云计算标准和应用大会 | 云计算国家标准及白皮书系列发布 华云数据全面参与编制

How to automatically install pythn third-party libraries
随机推荐
JDBC reads a large amount of data, resulting in memory overflow
【在優麒麟上使用Electron開發桌面應】
Trust counts the number of occurrences of words in the file
Idea configuring NPM startup
怎么自动安装pythn三方库
Quickly generate IPA package
The 2022 China Xinchuang Ecological Market Research and model selection evaluation report released that Huayun data was selected as the mainstream manufacturer of Xinchuang IT infrastructure!
Whether to take a duplicate subset with duplicate elements [how to take a subset? How to remove duplicates?]
蚂蚁集团开源可信隐私计算框架「隐语」:开放、通用
小程序 修改样式 ( placeholder、checkbox的样式)
Reading notes of Clickhouse principle analysis and Application Practice (5)
项目中遇到的问题 u-parse 组件渲染问题
How to obtain the coordinates of the aircraft passing through both ends of the radar
@Extension, @spi annotation principle
《ClickHouse原理解析与应用实践》读书笔记(5)
[paddlepaddle] paddedetection face recognition custom data set
Memory management chapter of Kobayashi coding
buuctf-pwn write-ups (9)
About Estimation with Cross-Validation
Writing writing writing