Created
April 26, 2018 10:58
-
-
Save Romeh/21e9b76d2dd68171232dfbe83110bfc4 to your computer and use it in GitHub Desktop.
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
/** | |
* 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