+ private static Future<?> abort(final ShardDataTreeCohort cohort) {
+ final CompletableFuture<Void> f = new CompletableFuture<>();
+ cohort.abort(new FutureCallback<Void>() {
+ @Override
+ public void onSuccess(final Void result) {
+ f.complete(null);
+ }
+
+ @Override
+ public void onFailure(final Throwable failure) {
+ f.completeExceptionally(failure);
+ }
+ });
+
+ return f;
+ }
+