/* * Copyright (c) 2020 PANTHEON.tech, s.r.o. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ package org.opendaylight.mdsal.binding.api; import com.google.common.util.concurrent.FluentFuture; import org.eclipse.jdt.annotation.NonNull; 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; /** * Query-like operations supported by {@link ReadTransaction} and {@link ReadWriteTransaction}. This interface defines * the operations without a tie-in with lifecycle management. */ public interface QueryOperations { /** * Executes a query on the provided logical data store. * * @param store Logical data store from which read should occur. * @param query Query to execute * @return a FluentFuture containing the result of the query. The Future blocks until the operation is complete. * Once complete: * * @throws NullPointerException if any of the arguments is null * @throws IllegalArgumentException if the query is not supported */ @NonNull FluentFuture> execute(@NonNull LogicalDatastoreType store, @NonNull QueryExpression query); }