Level Up Your Java Streams with Gatherers
summary
Java 24 adds Stream Gatherers and the session shows concrete code: five default gatherers—window fixed and window sliding, scan and fold, plus mapConcurrent uses virtual threads—with demos on temperature sensor streams that compute hourly averages (windows of 60) and running averages. Examples include a zip-with-index gatherer using mutable state, IntelliJ’s “trace current stream chain” debugging, mapConcurrent with maxConcurrency=3 preserving order, and guidance to start with sequential gatherers before adding parallel support.
AI-written summary · about
chapters (14)
- 0:00From heat wave to Java streams
- 3:15Java streams recap
- 7:11Stream pipeline demo
- 11:24Limitations of standard streams
- 12:30Java 24 gatherers intro
- 15:19Fixed window gatherer
- 19:37Sliding window gatherer
- 21:24Scan and fold gatherers
- 27:51Map concurrent gatherer
- 29:15Custom gatherers from scratch
- 33:48Zip with index gatherer
- 38:23Sensor data challenges
- 39:25Gatherers summary
- 40:37Q&A
related talks
57mMaximizing the Performance of Java 8 Streams
01h 00mProgramming with Streams in Java 8
01h 09mContinuous Monitoring With JDK Flight Recorder (JFR)
43mGarbage Collection in Java: The Performance Benefits of Upgrading
41mJava 24, Faster Than Ever
43mWatermarks - Practical Tool for Any Streaming and Event Processing Application
42mFaster Scala Collections with Scalaxy/Streams!
32mProcess Data Streams Efficiently in Elixir
