blob: 30e5596f72506a6963306b0ef98bcd165d178718 [file] [log] [blame]
Brian O'Connor119672d2014-08-03 21:36:58 -07001package net.onrc.onos.core.datagrid;
2
3import java.util.concurrent.BlockingQueue;
4import java.util.concurrent.ConcurrentMap;
5
6import net.floodlightcontroller.core.module.IFloodlightService;
7
8/**
9 * Interface for providing shared maps and queues to other modules.
10 */
11public interface ISharedCollectionsService extends IFloodlightService {
12 /**
13 * Create an shared, concurrent map.
14 *
15 * @param mapName the shared map name.
16 * @param typeK the type of the Key in the map.
17 * @param typeV the type of the Value in the map.
18 * @return the shared map for the channel name.
19 */
20 <K, V> ConcurrentMap<K, V> getConcurrentMap(String mapName,
21 Class<K> typeK, Class<V> typeV);
22
23 /**
24 * Create an shared, blocking queue.
25 *
26 * @param queueName the shared queue name.
27 * @param typeT the type of the queue.
28 * @return the shared queue for the queue name.
29 */
30 <T> BlockingQueue<T> getBlockingQueue(String queueName,
31 Class<T> typeT);
32}