Java 21: Focus on Virtual Threads and Pattern Matching

preview_player
Показать описание
Java 21 is coming with many new features, two of which will have a tremendous impact on the way you write Java code. This session covers these significant topics: virtual threads and pattern matching that enables data-oriented programming for the Java platform. First, you’ll learn how virtual threads fix several problems with the executor service pattern and propose an alternative programming model to asynchronous programming. This model lowers the maintenance cost of your application code and also improves its observability.

Then, you’ll see how data-oriented programming can improve the quality of your architecture. It is an alternative to object-oriented programming, a paradigm on which Java has been built from the beginning. It relies on three features: sealed classes, records, and pattern matching. Records and sealed classes are already final features, whereas pattern matching is still under work, with some elements already there and more to come.

Speaker: José Paumard

Join us:

#java #intelliJ #jetbrains
Рекомендации по теме
Комментарии
Автор

so exited for virtual threads I've dying to use a similar thing like coroutines in java

yashverma
Автор

trying to using virtual threads in jdk 21. when i am using Thread.ofVirtual().factory() and compiling throw jdk 21 . it's giving error ofVirtual() is a preview API and is disabled by default. Is it not the permanent feature. i got the information in this video that you can start using this. Kindly help me with this. IDE is intellij

neerajvkswami
Автор

Hey Jose. I would like to point out CompletableFuture APIs are not like asynchronous framework. because it will block the thread from the threadpool(if you pass a pool) or the commonpool . Hence completeableFuture APIs itself will not be able to achieve 1 million concurrency, without the help of virtual thread. Do you agree?

tarphuer
Автор

Great presentation. I've read the final nature of records make them incompatible with the JPA specification for entities. Are there any future plans to introduce something similar to records that could work to reduce the verbosity of writing JPA entities?

AndreTiconaRollano
Автор

How does one work with records without a mapping API (so called "with"), it's pretty much useless.
Only useful for situations when you don't need mapping, but what happens when you suddenly need to? You will need to write a robust copy with 1 modified argument.

eNtrozx
Автор

Indian english accent it´s difficult to understand -__-

brandpcalderon
visit shbcf.ru