BUG-6650: ep-sgt/ip, propose initial sxp-ep-provider
[groupbasedpolicy.git] / sxp-integration / sxp-ep-provider / src / main / java / org / opendaylight / groupbasedpolicy / sxp / ep / provider / impl / ReadableAsyncByKey.java
1 /*
2  * Copyright (c) 2016 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
9 package org.opendaylight.groupbasedpolicy.sxp.ep.provider.impl;
10
11 import com.google.common.util.concurrent.ListenableFuture;
12 import java.util.Collection;
13 import javax.annotation.Nonnull;
14
15 /**
16  * Purpose: simple asynchronous search interface allowing for custom key and returning list of values
17  *
18  * @param <X> special key type
19  * @param <V> value type
20  */
21 public interface ReadableAsyncByKey<X, V> {
22
23     /**
24      * @param specialKey custom key to search by
25      * @return list of found values
26      */
27     ListenableFuture<Collection<V>> readBy(@Nonnull X specialKey);
28 }