@Test public void submit() throws Exception { doNothing().when(DATA_TREE).validate(any()); doNothing().when(DATA_TREE).commit(any()); inmemoryDOMDataTreeShardWriteTransaction.ready(); assertNull(inmemoryDOMDataTreeShardWriteTransaction.submit().get()); verify(DATA_TREE).commit(any()); verify(DATA_TREE).validate(any()); }
@Override public ListenableFuture<Void> submit() { LOG.debug("Submitting open transaction on shard {}", modification.getPrefix()); requireNonNull(cohorts); checkState(!cohorts.isEmpty(), "Transaction was not readied yet."); return executor.submit(new ShardSubmitCoordinationTask(modification.getPrefix(), cohorts, this)); }
InmemoryDOMDataTreeShardWriteTransaction implements DOMDataTreeShardWriteTransaction, Identifiable<String> { @Override public ListenableFuture<Void> submit() { LOG.debug("Submitting open transaction on shard {}", modification.getPrefix()); requireNonNull(cohorts); checkState(!cohorts.isEmpty(), "Transaction was not readied yet."); return executor.submit(new ShardSubmitCoordinationTask(modification.getPrefix(), cohorts, this)); } }
InmemoryDOMDataTreeShardWriteTransaction implements DOMDataTreeShardWriteTransaction, Identifiable<String> { @Override public ListenableFuture<Void> submit() { LOG.debug("Submitting open transaction on shard {}", modification.getPrefix()); requireNonNull(cohorts); checkState(!cohorts.isEmpty(), "Transaction was not readied yet."); return executor.submit(new ShardSubmitCoordinationTask(modification.getPrefix(), cohorts, this)); } InmemoryDOMDataTreeShardWriteTransaction(final InMemoryDOMDataTreeShardProducer producer,
                                             final ShardDataModification root,
                                             final DataTree rootShardDataTree,
                                             final InMemoryDOMDataTreeShardChangePublisher changePublisher,
                                             final ListeningExecutorService executor); }
InmemoryDOMDataTreeShardWriteTransaction implements DOMDataTreeShardWriteTransaction, Identifiable<String> { @Override public ListenableFuture<Void> submit() { LOG.debug("Submitting open transaction on shard {}", modification.getPrefix()); requireNonNull(cohorts); checkState(!cohorts.isEmpty(), "Transaction was not readied yet."); return executor.submit(new ShardSubmitCoordinationTask(modification.getPrefix(), cohorts, this)); } 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); }
InmemoryDOMDataTreeShardWriteTransaction implements DOMDataTreeShardWriteTransaction, Identifiable<String> { @Override public ListenableFuture<Void> submit() { LOG.debug("Submitting open transaction on shard {}", modification.getPrefix()); requireNonNull(cohorts); checkState(!cohorts.isEmpty(), "Transaction was not readied yet."); return executor.submit(new ShardSubmitCoordinationTask(modification.getPrefix(), cohorts, this)); } 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);  }