~/talk

Level Up Your Java Streams with Gatherers

Talkat Jfokus 2026 · 2026-02-02..02-04· [java]
slides:none on file

Java 24/25 adds Stream Gatherers as a generic way to write custom intermediate stream operations, with five built-ins used here: window fixed (group 60-minute samples to compute hourly averages), window sliding (moving averages for smoothing), scan/fold (cumulative average vs final aggregate), and map concurrent (concurrent mapping using virtual threads while preserving input order). The demo builds a zip with index gatherer via gatherers.ofSequential with mutable state and downstream.push, explains finisher/combiner for parallel use, and shows they work lazily and with infinite streams.

AI-written summary · about

  1. 0:00Introduction to Java streams
  2. 3:47Understanding stream pipelines
  3. 9:41Limitations and stream gatherers
  4. 12:13Windowing gatherers
  5. 17:28Aggregation with scan and fold
  6. 25:26Concurrent mapping
  7. 27:42Implementing custom gatherers
  8. 34:20Building a custom zip gatherer
  9. 39:07Conclusion and recap
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.