use of org.opendaylight.mdsal.dom.api.DOMDataTreeReadOperations in project mdsal by opendaylight.
the class AbstractForwardedTransaction method doRead.
@NonNull
protected final <D extends DataObject> FluentFuture<Optional<D>> doRead(final DOMDataTreeReadOperations readOps, final LogicalDatastoreType store, final InstanceIdentifier<D> path) {
checkArgument(!path.isWildcarded(), "Invalid read of wildcarded path %s", path);
final CurrentAdapterSerializer codec = adapterContext.currentSerializer();
final YangInstanceIdentifier domPath = codec.toYangInstanceIdentifier(path);
return readOps.read(store, domPath).transform(optData -> optData.map(domData -> (D) codec.fromNormalizedNode(domPath, domData).getValue()), MoreExecutors.directExecutor());
}
Aggregations