This file contains hidden or 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
// See https://issues.apache.org/jira/browse/KAFKA-6987 for ongoing work on KafkaFuture implementation of CompletableFuture | |
private <T> CompletableFuture<T> toCompletableFuture(final KafkaFuture<T> kafkaFuture) { | |
final CompletableFuture<T> wrappingFuture = new CompletableFuture<>(); | |
kafkaFuture.whenComplete((value, throwable) -> { | |
if (throwable != null) { | |
wrappingFuture.completeExceptionally(throwable); | |
} else { | |
wrappingFuture.complete(value); | |
} | |
}); |
This file contains hidden or 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
## Obtain Token and Invoke Service |
This file contains hidden or 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
package models | |
import scala.slick.driver.H2Driver.simple._ | |
import scala.slick.session.Session | |
/** | |
* Created with IntelliJ IDEA. | |
* User: Magnus.Smith | |
* Date: 21/01/13 | |
* Time: 16:20 |