AsyncPromise<Void> () { AsyncPromise<Void> result = new AsyncPromise<>(); rebuild(); TreeVisitor visitor = path -> { AbstractTreeNode<?> node = TreeUtil.getLastUserObject(AbstractTreeNode.class, path); if (node != null) node.update(); return TreeVisitor.Action.CONTINUE; }; myAsyncTreeModel.accept(visitor).onProcessed(ignore -> result.setResult(null)); return result; }