@Test(expected = IllegalStateException.class) public void testChainedWriteTransactionsWithPreviousTxNotReady() { ActorRef actorRef = setupActorContextWithInitialCreateTransaction(getSystem(), WRITE_ONLY); expectBatchedModifications(actorRef, 1); try (TransactionChainProxy txChainProxy = new TransactionChainProxy(mockComponentFactory, historyId)) { DOMStoreWriteTransaction writeTx1 = txChainProxy.newWriteOnlyTransaction(); NormalizedNode<?, ?> writeNode1 = ImmutableNodes.containerNode(TestModel.TEST_QNAME); writeTx1.write(TestModel.TEST_PATH, writeNode1); txChainProxy.newWriteOnlyTransaction(); } }
@Override public DOMStoreWriteTransaction newWriteOnlyTransaction() { getActorUtils().acquireTxCreationPermit(); return allocateWriteTransaction(TransactionType.WRITE_ONLY); }
TransactionChainProxy extends AbstractTransactionContextFactory<LocalTransactionChain> implements DOMStoreTransactionChain { @Override public DOMStoreWriteTransaction newWriteOnlyTransaction() { getActorUtils().acquireTxCreationPermit(); return allocateWriteTransaction(TransactionType.WRITE_ONLY); } }
TransactionChainProxy extends AbstractTransactionContextFactory<LocalTransactionChain> implements DOMStoreTransactionChain { @Override public DOMStoreWriteTransaction newWriteOnlyTransaction() { getActorUtils().acquireTxCreationPermit(); return allocateWriteTransaction(TransactionType.WRITE_ONLY); } TransactionChainProxy(final TransactionContextFactory parent, final LocalHistoryIdentifier historyId); }
TransactionChainProxy extends AbstractTransactionContextFactory<LocalTransactionChain> implements DOMStoreTransactionChain { @Override public DOMStoreWriteTransaction newWriteOnlyTransaction() { getActorUtils().acquireTxCreationPermit(); return allocateWriteTransaction(TransactionType.WRITE_ONLY); } TransactionChainProxy(final TransactionContextFactory parent, final LocalHistoryIdentifier historyId); @Override DOMStoreReadTransaction newReadOnlyTransaction(); @Override DOMStoreReadWriteTransaction newReadWriteTransaction(); @Override DOMStoreWriteTransaction newWriteOnlyTransaction(); @Override void close(); }
TransactionChainProxy extends AbstractTransactionContextFactory<LocalTransactionChain> implements DOMStoreTransactionChain { @Override public DOMStoreWriteTransaction newWriteOnlyTransaction() { getActorUtils().acquireTxCreationPermit(); return allocateWriteTransaction(TransactionType.WRITE_ONLY); } TransactionChainProxy(final TransactionContextFactory parent, final LocalHistoryIdentifier historyId); @Override DOMStoreReadTransaction newReadOnlyTransaction(); @Override DOMStoreReadWriteTransaction newReadWriteTransaction(); @Override DOMStoreWriteTransaction newWriteOnlyTransaction(); @Override void close();  }