Skip to content

support async query results #61

Open
@easybest

Description

@easybest

Repository queries can be executed asynchronously using Spring’s asynchronous method execution capability. This means the method will return immediately upon invocation and the actual query execution will occur in a task that has been submitted to a Spring TaskExecutor.

@Async
Future<User> findByFirstname(String firstname);               

@Async
CompletableFuture<User> findOneByFirstname(String firstname); 

@Async
ListenableFuture<User> findOneByLastname(String lastname);    
  1. Use java.util.concurrent.Future as return type.
  2. Use a Java 8 java.util.concurrent.CompletableFuture as return type.
  3. Use a org.springframework.util.concurrent.ListenableFuture as return type.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions