当前位置:网站首页>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)
边栏推荐
- Take a look at semaphore, the current limiting tool provided by JUC
- Login and connect CDB and PDB
- Introduction to Resampling
- New words new words new words new words [2]
- 第十一届中国云计算标准和应用大会 | 华云数据成为全国信标委云计算标准工作组云迁移专题组副组长单位副组长单位
- Einstein sum einsum
- Is it safe to make fund fixed investment on access letter?
- 《力扣刷题计划》复制带随机指针的链表
- How to automatically install pythn third-party libraries
- sample_rate(采样率),sample(采样),duration(时长)是什么关系
猜你喜欢
Memory management chapter of Kobayashi coding
Vulnhub's darkhole_ two
第十一届中国云计算标准和应用大会 | 云计算国家标准及白皮书系列发布 华云数据全面参与编制
IDEA配置npm启动
About Estimation with Cross-Validation
Fix vulnerability - mysql, ES
node_exporter内存使用率不显示
Trust counts the number of occurrences of words in the file
记录Pytorch中的eval()和no_grad()
【HCIA-cloud】【1】云计算的定义、什么是云计算、云计算的架构与技术说明、华为云计算产品、华为内存DDR配置工具说明
随机推荐
瞅一瞅JUC提供的限流工具Semaphore
A2L file parsing based on CAN bus (3)
生词生词生词生词[2]
sample_rate(采样率),sample(采样),duration(时长)是什么关系
RPC协议详解
Find in MySQL_ in_ Detailed explanation of set() function usage
2022年阿里Android高级面试题分享,2022阿里手淘Android面试题目
Exemple Quelle est la relation entre le taux d'échantillonnage, l'échantillon et la durée?
Quickly generate IPA package
蚂蚁集团开源可信隐私计算框架「隐语」:开放、通用
SAP 特征 特性 说明
开户注册股票炒股安全吗?有没有风险的?靠谱吗?
Is it safe for Apple mobile phone to speculate in stocks? Is it a fraud to get new debts?
Trust counts the number of occurrences of words in the file
小程序 修改样式 ( placeholder、checkbox的样式)
vulnhub之darkhole_2
IDEA配置npm启动
Tupu software digital twin | visual management system based on BIM Technology
Common time complexity
金太阳开户安全吗?万一免5开户能办理吗?