2 * Copyright (c) 2016 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.groupbasedpolicy.sxp.mapper.api;
10 import com.google.common.base.Optional;
11 import com.google.common.util.concurrent.ListenableFuture;
12 import javax.annotation.Nonnull;
13 import org.opendaylight.yangtools.yang.binding.DataObject;
16 * Purpose: encapsulate access to DS by exposing
19 * <dd>search through values (either in local cache or directly in DataStore)</dd>
22 * @param <K> data key type
23 * @param <V> data type
25 public interface DSAsyncDao<K, V extends DataObject> {
28 * @param key for search
29 * @return value found by key
31 ListenableFuture<Optional<V>> read(@Nonnull K key);