Brian O'Connor | 119672d | 2014-08-03 21:36:58 -0700 | [diff] [blame^] | 1 | package net.onrc.onos.core.datagrid; |
| 2 | |
| 3 | import java.util.concurrent.BlockingQueue; |
| 4 | import java.util.concurrent.ConcurrentMap; |
| 5 | |
| 6 | import net.floodlightcontroller.core.module.IFloodlightService; |
| 7 | |
| 8 | /** |
| 9 | * Interface for providing shared maps and queues to other modules. |
| 10 | */ |
| 11 | public 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 | } |