~/talk

Stream Gathers - The biggest change to Java Streams since 10 years

Talkat GeeCON 2024 · 2024-05-15..05-17· [java]
slides:none on file

Java 22 adds Stream Gatherers as a new intermediate-operation API that lets code define a gatherer API with initializer integrator combiner and finisher, so custom ops actually transform streams. Built-in gatherers include mapConcurrent (uses virtual threads to run mapping tasks concurrently with a configurable parallelism), fault and scan for reductions, and windowFixed/windowSliding that produce sublists (e.g. 1..8 into [1,2,3][4,5,6][7,8]). Example code shows a stateless uppercase mapper, a stateful limit returning first N elements, and a finisher that emits leftover windows.

AI-written summary · about

  1. 0:00Introduction to Stream Gathers
  2. 9:47What are Stream Gatherers
  3. 16:10Custom Gatherer API explained
  4. 20:45Stateless gatherer example
  5. 24:18Stateful gatherer with limit
  6. 30:24Fixed window gatherer demo
  7. 33:36Q&A on gatherers
~/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.