The New Flow API

The Flow class is part of the java.util.concurrent package. It helps developers incorporate reactive programming in their applications. The class has one method, defaultBufferSize(), and four interfaces.

The defaultBufferSize() is a static method that returns the default buffer size for publishing and subscribing buffering. This default value is 256 and it is returned as an int. Let's look at the four interfaces.

Get Java 9: Building Robust Modular Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.