~/talk

Hunting with Stream Gatherers

Talkat Voxxed Days Zürich 2025 · on Tuesday, 2025-03-25· [java]
slides:none on file

Java 24 adds Stream Gatherers as a real extension point to replace collector-only hacks and clumsy intermediate workarounds: an integrator-driven API with supplier/combiner/finisher lets code emit zero‑to‑N elements, suspend, short‑circuit and keep state. Demos include a unique-by-length gatherer replacing nested collectors, sliding/fixed windows and an n‑gram generator that matches Elasticsearch tokenization, plus gather-map-concurrent that uses virtual threads to handle 100 concurrent IO tasks in ≈1s instead of 9s on a 12‑core machine.

AI-written summary · about

  1. 0:00Introduction
  2. 1:48Upgrading to Java 24
  3. 5:02Java 8 streams limits
  4. 10:18Problem with collectors
  5. 17:19Stream gatherers solution
  6. 20:54Stream gatherers in Java 24
  7. 23:44Gatherer interface
  8. 26:34Built-in gatherers use cases
  9. 29:02Windowing and palindromes
  10. 34:39Concurrent mapping with threads
  11. 39:16N-gram tokenizer
  12. 43:15Closing
~/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.