Vert.x 3 generates extension suspending extension methods, e.g get(Handler<AsyncResult<Result>> generates getAwait() extension method. Vert.x 4 provides a future based model and the Vert.x Future has an await() extension methods that does the same.
In other words, code like:
var result = getAwait();
Can be replaced by
var result = get().await();
The generator will continue to generate these methods (but not for new projects) and the generated code will be deprecated with a ReplaceWith member, e.g:
@Deprecated(message = "Instead use queryStream returning a future that can yield a result ", replaceWith = ReplaceWith("queryStream(sql).await()"))
suspend fun CassandraClient.queryStreamAwait(sql: String): CassandraRowStream {
return awaitResult {
this.queryStream(sql, it)
}
}
Vert.x 3 generates extension suspending extension methods, e.g
get(Handler<AsyncResult<Result>>
generatesgetAwait()
extension method. Vert.x 4 provides a future based model and the Vert.xFuture
has anawait()
extension methods that does the same.In other words, code like:
Can be replaced by
The generator will continue to generate these methods (but not for new projects) and the generated code will be deprecated with a
ReplaceWith
member, e.g: