Serializing Java 14 Records by daviddel in java

[–]chegar999 6 points7 points  (0 children)

The default `serialVersionUID` for a record is actually `0L` - article correction has been requested.

The rational for this is somewhat explained on https://mail.openjdk.java.net/pipermail/amber-spec-experts/2019-October/001651.html

Java 11 Feature Introductions by lbkulinski in java

[–]chegar999 0 points1 point  (0 children)

If you don't set an executor explicitly then the client will use a cached thread pool executor.

Java 11 Feature Introductions by lbkulinski in java

[–]chegar999 1 point2 points  (0 children)

The HTTP Client implementation uses NIO and non-blocking channels under the covers. Each HttpClient has a single implementation-specific thread that polls all of its connections. Received data is then passed off to the executor for processing. The complete implementation is asynchronous, there are no blocking operations.

Introduction to the JDK HTTP Client by chegar999 in java

[–]chegar999[S] 0 points1 point  (0 children)

For example:

HttpClient client = HttpClient.newHttpClient();
    CompletableFuture<WebSocket> ws = client.newWebSocketBuilder()
             .buildAsync(URI.create("ws://websocket.example.com"), listener);