use of org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType in project genius by opendaylight.
the class SingleTransactionDataBroker method syncDelete.
public static <T extends DataObject> void syncDelete(DataBroker broker, LogicalDatastoreType datastoreType, InstanceIdentifier<T> path, int maxRetries) throws TransactionCommitFailedException {
RetryingManagedNewTransactionRunner runner = new RetryingManagedNewTransactionRunner(broker, maxRetries);
ListenableFutures.checkedGet(runner.callWithNewWriteOnlyTransactionAndSubmit(tx -> tx.delete(datastoreType, path)), SUBMIT_MAPPER);
}
use of org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType in project genius by opendaylight.
the class SingleTransactionDataBroker method syncWrite.
public static <T extends DataObject> void syncWrite(DataBroker broker, LogicalDatastoreType datastoreType, InstanceIdentifier<T> path, T data, int maxRetries) throws TransactionCommitFailedException {
RetryingManagedNewTransactionRunner runner = new RetryingManagedNewTransactionRunner(broker, maxRetries);
ListenableFutures.checkedGet(runner.callWithNewWriteOnlyTransactionAndSubmit(tx -> tx.put(datastoreType, path, data, true)), SUBMIT_MAPPER);
}
Aggregations