- @Override
- public ListenableFuture<Void> preCommit() {
- try {
- candidate = dataTree.getDataTree().prepare(transaction);
- /*
- * FIXME: this is the place where we should be interacting with persistence, specifically by invoking
- * persist on the candidate (which gives us a Future).
- */
- LOG.debug("Transaction {} prepared candidate {}", transaction, candidate);
- return VOID_FUTURE;
- } catch (Exception e) {
- LOG.debug("Transaction {} failed to prepare", transaction, e);
- return Futures.immediateFailedFuture(e);
- }
- }
+ // FIXME: This leaks internal state generated in preCommit,
+ // should be result of canCommit
+ abstract DataTreeCandidateTip getCandidate();