blob: 30e5596f72506a6963306b0ef98bcd165d178718 [file] [log] [blame]
package net.onrc.onos.core.datagrid;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.ConcurrentMap;
import net.floodlightcontroller.core.module.IFloodlightService;
/**
* Interface for providing shared maps and queues to other modules.
*/
public interface ISharedCollectionsService extends IFloodlightService {
/**
* Create an shared, concurrent map.
*
* @param mapName the shared map name.
* @param typeK the type of the Key in the map.
* @param typeV the type of the Value in the map.
* @return the shared map for the channel name.
*/
<K, V> ConcurrentMap<K, V> getConcurrentMap(String mapName,
Class<K> typeK, Class<V> typeV);
/**
* Create an shared, blocking queue.
*
* @param queueName the shared queue name.
* @param typeT the type of the queue.
* @return the shared queue for the queue name.
*/
<T> BlockingQueue<T> getBlockingQueue(String queueName,
Class<T> typeT);
}