2 * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
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
8 package org.opendaylight.controller.md.sal.common.api.data;
10 import org.opendaylight.yangtools.concepts.Path;
12 import com.google.common.base.Optional;
13 import com.google.common.util.concurrent.ListenableFuture;
15 public interface AsyncReadTransaction<P extends Path<P>, D> extends AsyncTransaction<P, D> {
19 * Reads data from provided logical data store located at provided path
23 * Logical data store from which read should occur.
25 * Path which uniquely identifies subtree which client want to
27 * @return Listenable Future which contains read result
29 * <li>If data at supplied path exists the {@link Future#get()}
30 * returns Optional object containing data
31 * <li>If data at supplied path does not exists the
32 * {@link Future#get()} returns {@link Optional#absent()}.
35 ListenableFuture<Optional<D>> read(LogicalDatastoreType store, P path);