InmemoryDOMDataTreeShardWriteTransaction implements DOMDataTreeShardWriteTransaction, Identifiable<String> { @Override public void close() { checkState(!finished, "Attempting to close an already finished transaction."); modification.closeTransactions(); if (cursor != null) { cursor.close(); } producer.transactionAborted(this); finished = true; } InmemoryDOMDataTreeShardWriteTransaction(final InMemoryDOMDataTreeShardProducer producer,
                                             final ShardDataModification root,
                                             final DataTree rootShardDataTree,
                                             final InMemoryDOMDataTreeShardChangePublisher changePublisher,
                                             final ListeningExecutorService executor); @Override String getIdentifier(); @Override void close(); boolean isFinished(); @Override void ready(); @Override ListenableFuture<Void> submit(); @Override ListenableFuture<Boolean> validate(); @Override ListenableFuture<Void> prepare(); @Override ListenableFuture<Void> commit(); @Override DOMDataTreeWriteCursor createCursor(final DOMDataTreeIdentifier prefix);  }
@Test public void close() throws Exception { inmemoryDOMDataTreeShardWriteTransaction.createCursor(DOM_DATA_TREE_IDENTIFIER); inmemoryDOMDataTreeShardWriteTransaction.close(); assertTrue(inmemoryDOMDataTreeShardWriteTransaction.isFinished()); }