Merge "Fixed for bug 1197"
[controller.git] / opendaylight / md-sal / sal-dom-spi / src / main / java / org / opendaylight / controller / sal / core / spi / data / DOMStoreReadTransaction.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.sal.core.spi.data;
9
10 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
11 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
12
13 import com.google.common.base.Optional;
14 import com.google.common.util.concurrent.ListenableFuture;
15
16 public interface DOMStoreReadTransaction extends DOMStoreTransaction {
17
18     /**
19      *
20      * Reads data from provided logical data store located at provided path
21      *
22      *
23      * @param path
24      *            Path which uniquely identifies subtree which client want to
25      *            read
26      * @return Listenable Future which contains read result
27      *         <ul>
28      *         <li>If data at supplied path exists the {@link java.util.concurrent.Future#get()}
29      *         returns Optional object containing data
30      *         <li>If data at supplied path does not exists the
31      *         {@link java.util.concurrent.Future#get()} returns {@link Optional#absent()}.
32      *         </ul>
33      */
34     ListenableFuture<Optional<NormalizedNode<?,?>>> read(YangInstanceIdentifier path);
35 }