@Override public void delete(final LogicalDatastoreType store, final InstanceIdentifier<?> path) { delegate.delete(store, path); }
@Override public final void delete(final InstanceIdentifier<?> path) { delegate().delete(getDatastoreType(), path); postOperation(); }
/** * Implemented from the AutoCloseable interface. */ @Override public void close() { LOG.info("Closing..."); // Unregister our MXBean. unregister(); // When we close this service we need to shutdown our executor! executor.shutdown(); if (dataTreeChangeListenerRegistration != null) { dataTreeChangeListenerRegistration.close(); } if (dataBroker != null) { WriteTransaction tx = dataBroker.newWriteOnlyTransaction(); tx.delete(OPERATIONAL,TOASTER_IID); Futures.addCallback(tx.commit(), new FutureCallback<CommitInfo>() { @Override public void onSuccess(final CommitInfo result) { LOG.debug("Successfully deleted the operational Toaster"); } @Override public void onFailure(final Throwable failure) { LOG.error("Delete of the operational Toaster failed", failure); } }, MoreExecutors.directExecutor()); } }
private <T extends DataObject> void deleteData(final LogicalDatastoreType store, final InstanceIdentifier<T> path) { final WriteTransaction tx = getDataBroker().newWriteOnlyTransaction(); tx.delete(OPERATIONAL, path); tx.commit().addCallback(new FutureCallback<CommitInfo>() { @Override public void onSuccess(final CommitInfo result) { LOG.trace("Data has deleted from datastore {} {}", store, path); } @Override public void onFailure(final Throwable ex) { LOG.error("Can not delete data from datastore [store: {}] [path: {}]", store, path, ex); } }, MoreExecutors.directExecutor()); }
InstanceIdentifier<OuterList> iid = InstanceIdentifier.create(TestExec.class) .child(OuterList.class, new OuterListKey(l)); tx.delete(dsType, iid);
InstanceIdentifier<OuterList> iid = InstanceIdentifier.create(TestExec.class) .child(OuterList.class, new OuterListKey((int)l)); tx.delete(dsType, iid); putCnt++; if (putCnt == writesPerTx) {