@Test public void testDelete() { dataStoreContextBuilder.shardBatchedModificationCount(1); ActorRef actorRef = setupActorContextWithInitialCreateTransaction(getSystem(), WRITE_ONLY); expectBatchedModifications(actorRef, 1); TransactionProxy transactionProxy = new TransactionProxy(mockComponentFactory, WRITE_ONLY); transactionProxy.delete(TestModel.TEST_PATH); verifyOneBatchedModification(actorRef, new DeleteModification(TestModel.TEST_PATH), false); }
@Override public void delete(final YangInstanceIdentifier path) { checkModificationState("delete", path); if (path.isEmpty()) { deleteAllData(); } else { executeModification(new DeleteOperation(path)); } }
TransactionProxy extends AbstractDOMStoreTransaction<TransactionIdentifier> implements DOMStoreReadWriteTransaction { @Override public void delete(final YangInstanceIdentifier path) { checkModificationState("delete", path); if (path.isEmpty()) { deleteAllData(); } else { executeModification(new DeleteOperation(path)); } } }
TransactionProxy extends AbstractDOMStoreTransaction<TransactionIdentifier> implements DOMStoreReadWriteTransaction { @Override public void delete(final YangInstanceIdentifier path) { checkModificationState("delete", path); if (path.isEmpty()) { deleteAllData(); } else { executeModification(new DeleteOperation(path)); } } @VisibleForTesting  TransactionProxy(final AbstractTransactionContextFactory<?> txContextFactory, final TransactionType type); }
TransactionProxy extends AbstractDOMStoreTransaction<TransactionIdentifier> implements DOMStoreReadWriteTransaction { @Override public void delete(final YangInstanceIdentifier path) { checkModificationState("delete", path); if (path.isEmpty()) { deleteAllData(); } else { executeModification(new DeleteOperation(path)); } } @VisibleForTesting  TransactionProxy(final AbstractTransactionContextFactory<?> txContextFactory, final TransactionType type); @Override FluentFuture<Boolean> exists(final YangInstanceIdentifier path); @Override FluentFuture<Optional<NormalizedNode<?, ?>>> read(final YangInstanceIdentifier path); @Override void delete(final YangInstanceIdentifier path); @Override void merge(final YangInstanceIdentifier path, final NormalizedNode<?, ?> data); @Override void write(final YangInstanceIdentifier path, final NormalizedNode<?, ?> data); @Override final void close(); @Override final AbstractThreePhaseCommitCohort<?> ready(); }
TransactionProxy extends AbstractDOMStoreTransaction<TransactionIdentifier> implements DOMStoreReadWriteTransaction { @Override public void delete(final YangInstanceIdentifier path) { checkModificationState("delete", path); if (path.isEmpty()) { deleteAllData(); } else { executeModification(new DeleteOperation(path)); } } @VisibleForTesting  TransactionProxy(final AbstractTransactionContextFactory<?> txContextFactory, final TransactionType type); @Override FluentFuture<Boolean> exists(final YangInstanceIdentifier path); @Override FluentFuture<Optional<NormalizedNode<?, ?>>> read(final YangInstanceIdentifier path); @Override void delete(final YangInstanceIdentifier path); @Override void merge(final YangInstanceIdentifier path, final NormalizedNode<?, ?> data); @Override void write(final YangInstanceIdentifier path, final NormalizedNode<?, ?> data); @Override final void close(); @Override final AbstractThreePhaseCommitCohort<?> ready();  }