- throw new IllegalArgumentException(String.format("Cannot read data %s for %s datastore, unknown datastore type", path, store));
+ throw new IllegalArgumentException(String.format("%s, Cannot read data %s for %s datastore, unknown datastore type", id, path, store));
+ }
+
+ @Override public CheckedFuture<Boolean, ReadFailedException> exists(
+ LogicalDatastoreType store,
+ YangInstanceIdentifier path) {
+ CheckedFuture<Optional<NormalizedNode<?, ?>>, ReadFailedException>
+ data = read(store, path);
+
+ try {
+ return Futures.immediateCheckedFuture(data.get().isPresent());
+ } catch (InterruptedException | ExecutionException e) {
+ return Futures.immediateFailedCheckedFuture(new ReadFailedException("Exists failed",e));
+ }