Skip to content

Instantly share code, notes, and snippets.

@Romeh Romeh/sample.java
Created Apr 26, 2018

Embed
What would you like to do?
/**
* get order state service API
*
* @param getOrderStatusCmd get Order state command
* @return order state
*/
public CompletableFuture<OrderState> getOrderStatus(OrderCmd.GetOrderStatusCmd getOrderStatusCmd) {
return PatternsCS.ask(getOrderEntity(), getOrderStatusCmd, timeout).toCompletableFuture()
.thenApply(handleGetState);
}
/**
* @return Persistent entity actor reference based into AKKA cluster sharding
*/
private final ActorRef getOrderEntity() {
return persistentEntityBroker.findPersistentEntity(OrderManager.class);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.