Last active
January 17, 2018 20:05
-
-
Save rowanl/0e9c910cbf0a0f111291a27a52a68748 to your computer and use it in GitHub Desktop.
playframework-kubernetes - Asynchronously find all models using Ebean in a non-blocking fashion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private <T> CompletionStage<T> wrapContext(Supplier<T> toRun) { | |
return supplyAsync(toRun, executionContext); | |
} | |
public CompletionStage<List<Charity>> findList() { | |
return wrapContext(() -> ebeanServer.find(Charity.class).findList()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment