~/talk

JEP 461: Breathing New Life into Java Stream API

Talkat JDD 2024 · 2024-10-22..10-23· [java]
slides:none on file

JEP 461 introduces gather, an intermediate collect-like operation shipped as a Java 22 preview that adds short-circuiting and streaming-first result types. Five built-ins arrive: windowFixed, windowSliding, fold, scan and mapConcurrent; mapConcurrent runs on virtual threads, accepts a maxConcurrency and avoids the ForkJoinPool pitfalls. The integrator returns true/false to continue or stop, enabling zipWithIndex, iterator zips, distinctBy, and last(n) to be implemented as custom gatherers — live-coding shows these work and a companion library “more-gatherers” collects additional useful operators.

AI-written summary · about

  1. 0:00Introduction to JEP 461
  2. 1:16Stream API basics recap
  3. 8:41Limitations of collectors
  4. 9:44Introducing gather method
  5. 11:54Anatomy of collector vs gutter
  6. 16:34Predefined gutters overview
  7. 20:55Map concurrent with virtual threads
  8. 26:14Parallel streams limitations
  9. 29:25Custom gutter implementation
  10. 38:32Distinct by property gutter
  11. 42:06Last N elements gutter
  12. 44:36Future of gutters 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.