Skip to content

Commit

Permalink
Remove usage of Handler/AsyncResult idiom.
Browse files Browse the repository at this point in the history
  • Loading branch information
vietj committed Sep 12, 2024
1 parent 3101b73 commit a78071d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/io/vertx/cassandra/impl/ResultSetImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public boolean wasApplied() {
return resultSetRef.get().wasApplied();
}

private void loadMore(Context context, List<Row> loaded, Handler<AsyncResult<List<Row>>> handler) {
private void loadMore(Context context, List<Row> loaded, Completable<List<Row>> handler) {
int availableWithoutFetching = resultSetRef.get().remaining();
List<Row> rows = new ArrayList<>(loaded.size() + availableWithoutFetching);
rows.addAll(loaded);
Expand All @@ -109,13 +109,13 @@ private void loadMore(Context context, List<Row> loaded, Handler<AsyncResult<Lis
loadMore(context, rows, handler);
} else {
if (handler != null) {
handler.handle(Future.failedFuture(ar.cause()));
handler.fail(ar.cause());
}
}
});
} else {
if (handler != null) {
handler.handle(Future.succeededFuture(rows));
handler.succeed(rows);
}
}
}
Expand Down

0 comments on commit a78071d

Please sign in to comment.