~/talk

Using Java CompletionStage in Asynchronous Programming

Talkat Oracle Code One 2018 · 2018-10-22..10-25· [java, concurrency]
slides:none on file

Shows concrete code wiring java.util.concurrent.CompletionStage and CompletableFuture into ADBA via the AOJ implementation, using supplyAsync/thenRunAsync to execute queries off the caller thread and thenCompose/thenComposeAsync to splice functions that return CompletionStage. Demonstrates a real submit implementation where moreRows builds repeated composed futures to fetch and process batches of rows. AOJ is a blocking proof‑of‑concept over JDBC so it works but does not scale; advice is to use CompletionStage API, not subclass CompletableFuture.

AI-written summary · about

  1. 0:00Introduction
  2. 1:10What is CompletionStage
  3. 4:06Example
  4. 9:34DBA Code
  5. 11:48DBA Over JDBC
  6. 13:33Aoj Implementation
  7. 15:03Submit Implementation
  8. 17:27Handle Implementation
  9. 18:51Follows
  10. 20:52Compose
  11. 23:25Execute
  12. 24:45HandleRows
  13. 27:25MoreRows
  14. 30:29Summary
  15. 33:17Using a DBA
  16. 34:56Using compose
  17. 37:51DBAs
  18. 39:04More Rows
  19. 41:25Processing Exceptions
  20. 43:25Conclusion
~/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.