- return debugTransactions;
- }
-
- final DataTreeSnapshot takeSnapshot() {
- return dataTree.takeSnapshot();
- }
-
- @Override
- public synchronized <L extends DOMDataTreeChangeListener> ListenerRegistration<L> registerTreeChangeListener(
- final YangInstanceIdentifier treeId, final L listener) {
- /*
- * Make sure commit is not occurring right now. Listener has to be
- * registered and its state capture enqueued at a consistent point.
- */
- return changePublisher.registerTreeChangeListener(treeId, listener, dataTree.takeSnapshot());
- }
-
- @Override
- protected void transactionAborted(final SnapshotBackedWriteTransaction<String> tx) {
- LOG.debug("Tx: {} is closed.", tx.getIdentifier());
- }
-
- @Override
- protected DOMStoreThreePhaseCommitCohort transactionReady(final SnapshotBackedWriteTransaction<String> tx,
- final DataTreeModification modification,
- final Exception readyError) {
- LOG.debug("Tx: {} is submitted. Modifications: {}", tx.getIdentifier(), modification);
- return new InMemoryDOMStoreThreePhaseCommitCohort(this, tx, modification, readyError);
- }
-
- String nextIdentifier() {
- return name + "-" + txCounter.getAndIncrement();
- }
-
- void validate(final DataTreeModification modification) throws DataValidationFailedException {
- dataTree.validate(modification);
- }
-
- DataTreeCandidate prepare(final DataTreeModification modification) {
- return dataTree.prepare(modification);
- }
-
- synchronized void commit(final DataTreeCandidate candidate) {
- dataTree.commit(candidate);
- changePublisher.publishChange(candidate);