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 java.util.concurrent.Future;
12 import org.opendaylight.yangtools.concepts.Path;
14 import com.google.common.base.Optional;
15 import com.google.common.util.concurrent.ListenableFuture;
17 public interface AsyncReadTransaction<P extends Path<P>, D> extends AsyncTransaction<P, D> {
21 * Reads data from provided logical data store located at provided path
25 * Logical data store from which read should occur.
27 * Path which uniquely identifies subtree which client want to
29 * @return Listenable Future which contains read result
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()}.
37 ListenableFuture<Optional<D>> read(LogicalDatastoreType store, P path);