Skip to main content

Improvements in Blocking API Calls in Java

· One min read

We've made several improvements to our Java SDK, resulting in considerable resource savings and speed-up, in case of blocking API calls. To benefit from these improvements, please generate your SDKs again.

Details

We've revamped our Code Generator for Java to generate better code in case of blocking API calls.

Previously, the methods for blocking API calls were a wrapper around the asynchronous version and used locks to wait on the result. However, this lead to extra resource usage such as threads being consumed and time being wasted when waiting on threads.

The revamped code relies on the HTTP Client to provide a blocking way of making HTTP calls, instead of reimplementing this at the SDK layer.

We were able to do this without introducing any breaking changes; hence, generating an updated Java SDK is recommended.