Skip to content

Change Future<T> to CompletableFuture<T> in java client #10325

@cgenrich

Description

@cgenrich

Future.get() blocks threads and causes performance issues for users of the java client library or requires an additional watcher thread checking for completions and issuing callbacks. The underlying HTTP client provides non-blocking IO and a ListenableFuture that is easily modified into a CompletableFuture.

Using callbacks users of the library will see higher performance without any noticeable drawbacks.

CompletableFuture implements Future so any users of the library can continue to do so without changing their code should they choose to do so.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions