-
- final ListenableFuture<List<Void>> listListenableFuture = Futures.allAsList(
- transactions.values().stream().map(tx -> {
- LOG.debug("Readying tx {}", identifier);
+ LOG.debug("Readying tx {}", identifier);
+
+ final ListenableFuture<?> future;
+ switch (transactions.size()) {
+ case 0:
+ success.accept(this);
+ return;
+ case 1: {
+ final DOMDataTreeShardWriteTransaction tx = transactions.values().iterator().next();