import com.google.common.util.concurrent.FluentFuture;
import java.util.Optional;
+import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.mdsal.binding.api.ReadTransaction;
import org.opendaylight.mdsal.binding.api.Transaction;
+import org.opendaylight.mdsal.binding.api.query.QueryExpression;
+import org.opendaylight.mdsal.binding.api.query.QueryResult;
import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
+import org.opendaylight.mdsal.common.api.ReadFailedException;
import org.opendaylight.yangtools.yang.binding.DataObject;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
* @return A future providing access to the result of the check, when it’s available, or any error encountered.
*/
FluentFuture<Boolean> exists(InstanceIdentifier<?> path);
+
+ /**
+ * Executes a {@link QueryExpression}.
+ *
+ * @param query Query to execute
+ * @return a FluentFuture containing the result of the query. The Future blocks until the operation is complete.
+ * Once complete:
+ * <ul>
+ * <li>The Future returns the result of the query</li>
+ * <li>If the query execution fails, the Future will fail with a {@link ReadFailedException} or
+ * an exception derived from ReadFailedException.
+ * </li>
+ * </ul>
+ * @throws NullPointerException if any of the arguments is null
+ * @throws IllegalArgumentException if the query is not supported
+ */
+ <T extends @NonNull DataObject> FluentFuture<QueryResult<T>> execute(QueryExpression<T> query);
}