~/talk

The Gatherer API: the tool that was missing in the Stream API

Talkat Devoxx UK 2025 · 2025-05-07..05-09· [java]
slides:none on file

JDK 24 adds the Gatherer API to model intermediate Stream operations with a concrete gather(stream) → stream primitive. It exposes an initializer, integrator, combiner, finisher lifecycle, integrators can be greedy or non‑greedy, and downstream.push returns a boolean that implements backpressure. Parallel execution creates one mutable state per thread and uses the combiner; ready gatherers include window, scan, fold and mapConcurrent (mapping on virtual threads). Watch for closing sources and thread‑safety when mutating external state.

AI-written summary · about

  1. 0:00Introduction and Java versions
  2. 10:57Stream API limitations
  3. 23:02Gatherer API basics
  4. 35:32State and finisher in gatherers
  5. 43:38Parallel gatherers and combiners
  6. 50:31Summary and Q&A
~/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.