- private static ABIVersion toABIVersion(final short version) {
- switch (version) {
- case DataStoreVersions.BORON_VERSION:
- return ABIVersion.BORON;
- }
+ FutureConverters.toJava(actorContext.findPrimaryShardAsync(shardName)).thenCompose(info -> {
+ LOG.debug("Looking up primary info for {} from {}", shardName, info);
+ return FutureConverters.toJava(ExplicitAsk.ask(info.getPrimaryShardActor(), connectFunction, DEAD_TIMEOUT));
+ }).thenApply(response -> {
+ if (response instanceof RequestFailure) {
+ final RequestFailure<?, ?> failure = (RequestFailure<?, ?>) response;
+ LOG.debug("Connect request failed {}", failure, failure.getCause());
+ throw Throwables.propagate(failure.getCause());
+ }