What is the recommended way to execute long-running queries in jOOQ?
Are there any downsides in executing query asynchronously(except blocking operation on ForkJoinPool which could be mitigated by supplying execution to dedicated thread pool), converting result into CompletableFuture and calling get() method with specified timeout?
dslFactory
.create()
.selectFrom(TABLE_NAME)
.where(conditions)
.fetchAsync()
.toCompletableFuture().get(10, TimeUnit.SECONDS);