All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.opendaylight.mdsal.binding.api.QueryOperations Maven / Gradle / Ivy

The newest version!
/*
 * 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.mdsal.common.api.TransactionDatastoreMismatchException;
import org.opendaylight.yangtools.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:
     *         
    *
  • The Future returns the result of the query
  • *
  • If the query execution fails, the Future will fail with a {@link ReadFailedException} or * an exception derived from ReadFailedException. *
  • *
* @throws IllegalArgumentException if the query is not supported * @throws NullPointerException if any of the arguments is {@code null} * @throws TransactionDatastoreMismatchException if this transaction is already bound to a different data store */ @NonNull FluentFuture> execute(@NonNull LogicalDatastoreType store, @NonNull QueryExpression query); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy