Merge "Add filtering capability to config.ini in order to reference logging bridge...
[controller.git] / opendaylight / md-sal / sal-common-api / src / main / java / org / opendaylight / controller / md / sal / common / api / data / AsyncReadTransaction.java
1 /*
2  * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.controller.md.sal.common.api.data;
9
10 import java.util.concurrent.Future;
11
12 import org.opendaylight.yangtools.concepts.Path;
13
14 import com.google.common.base.Optional;
15 import com.google.common.util.concurrent.ListenableFuture;
16
17 public interface AsyncReadTransaction<P extends Path<P>, D> extends AsyncTransaction<P, D> {
18
19     /**
20      *
21      * Reads data from provided logical data store located at provided path
22      *
23      *
24      * @param store
25      *            Logical data store from which read should occur.
26      * @param path
27      *            Path which uniquely identifies subtree which client want to
28      *            read
29      * @return Listenable Future which contains read result
30      *         <ul>
31      *         <li>If data at supplied path exists the {@link Future#get()}
32      *         returns Optional object containing data
33      *         <li>If data at supplied path does not exists the
34      *         {@link Future#get()} returns {@link Optional#absent()}.
35      *         </ul>
36      */
37     ListenableFuture<Optional<D>> read(LogicalDatastoreType store, P path);
38
39 }