Bug 500: DOMStore SPI
[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 java.util.concurrent.Future;
11
12 import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier;
13 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
14
15 import com.google.common.base.Optional;
16 import com.google.common.util.concurrent.ListenableFuture;
17
18 public interface DOMStoreReadTransaction extends DOMStoreTransaction {
19
20     /**
21      *
22      * Reads data from provided logical data store located at provided path
23      *
24      *
25      * @param path
26      *            Path which uniquely identifies subtree which client want to
27      *            read
28      * @return Listenable Future which contains read result
29      *         <ul>
30      *         <li>If data at supplied path exists the {@link Future#get()}
31      *         returns Optional object containing data
32      *         <li>If data at supplied path does not exists the
33      *         {@link Future#get()} returns {@link Optional#absent()}.
34      *         </ul>
35      */
36     ListenableFuture<Optional<NormalizedNode<?,?>>> read(InstanceIdentifier path);
37 }