Hunting with Stream Gatherers
Speaker
About this talk
Streams were a very nice addition to Java 8, based on lambdas. They allow streamlined data processing without side effects, taking us gently towards functional style. With newer additions to Java, like records and pattern matching, they shine even more in data-driven flows.However, they don’t come without flaws.For starters, the only available extension point was collectors: if your needs for gathering data weren’t satisfied by the whole Collectors ZOO, you could always fall back to creating your own Collector. However, if map, filter or flatMap weren’t enough, you couldn’t add your own intermediate operation.Secondly, parallel streams were limited to ForkJoin pool, effectively rendering them unusable for scenarios involving any IO.Since Java 22, Stream Gatherers are our extension point for intermediate operations in streams.If you’d like to comprehend how they work, find nice use cases and hunt for more performance, this talk is for you.
More talks to watch
Let’s use IntelliJ as a game engine, just because we canAlexander Chatzizacharias
Devoxx Greece 2024 - Small steps are the fastest way forwardSander Hoogendoorn
A fun and absurd introduction to Vector DatabasesAlexander Chatzizacharias
Devoxx Greece 2024 - The lost art of software designSimon Brown
The Era of AAP: Ai Augmented Programming using only JavaStephan Janssen
From k9s to OpenTelemetry: A guide to observability for your apps in K8sMatthias Haeussle