2018-10-19

Java 9 : more concurrency updates

In this update, a new class, java.util.cuncurrent.Flow, has been introduced, which has java.util.concurrent nested interfaces supporting the implementation of a publish-subscribe framework. The publish-subscribe framework enables developers to build components that
can asynchronously consume a live stream of data by setting up publishers that produce the data and subscribers that consume the data via subscription, which manages them. The four new interfaces are as follows:

  • java.util.concurrent.Flow.Publisher
  • java.util.concurrent.Flow.Subscriber
  • java.util.concurrent.Flow.Subscription (which acts as both and Subscriber).
  • java.util.concurrent.Flow.Processor

No comments:

Post a Comment