Session
Stream Gatherers: Write Your Own Powerful Stream Operations!
The Java Stream API was released in March 2014 with Java 8, giving us an indispensable tool for data processing.
However, the limited set of intermediate operations – `filter`, `map`, `flatMap`, `mapMulti`, `distinct`, `sorted`, `peak`, `limit`, `skip`, `takeWhile`, and `dropWhile` – means that more complex data transformations cannot be expressed directly using the Stream API.
Operations such as `window` and `fold`, among many others frequently requested by the community, are missing.
Instead of adding all these operations directly to the Stream interface, the JDK team developed a new API. This API is used internally within the JDK to provide highly requested intermediate operations and also allows developers to implement their own custom operations.
This new API is called Stream Gatherers. It was first introduced as a preview feature (JEP 461) in Java 22 in March 2024 – exactly ten years after the original Stream API debut. The API was finalized in Java 24 (JEP 485).
In this talk, you’ll learn – both in theory and through hands-on live coding – what Stream Gatherers are and how they work, which Gatherers are already available in the JDK and how to use them effectively, how to implement your own Gatherers, and where the limitations of the new API lie.
This talk has been presented at:
- betterCode() Java 2024
- JUG Hamburg
- entwickler.de: 30 Years of Java
- JavaLand 2025 (listed as a Top Talk)
- Java Forum Stuttgart 2025
Sven Woltmann
Java trainer, consultant, speaker – author of HappyCoders.eu
Berlin, Germany
Links
Please note that Sessionize is not responsible for the accuracy or validity of the data provided by speakers. If you suspect this profile to be fake or spam, please let us know.
Jump to top