Package com.couchbase.client.core.util
Class CoreAsyncUtils
- java.lang.Object
-
- com.couchbase.client.core.util.CoreAsyncUtils
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> T
block(CompletableFuture<T> input)
Helper method to wrap an async call into a blocking one and make sure to convert all checked exceptions into their correct runtime counterparts.
-
-
-
Method Detail
-
block
public static <T> T block(CompletableFuture<T> input)
Helper method to wrap an async call into a blocking one and make sure to convert all checked exceptions into their correct runtime counterparts.- Type Parameters:
T
- the generic type to return.- Parameters:
input
- the future as input.- Returns:
- blocks and completes on the given future while converting checked exceptions.
-
-