package eu.dnetlib.enabling.manager.msro;

/**
 * Maps indices with mdstores.
 *
 * Currently this map API is primitive as it supports only one mdstore/index.
 *
 * @author marko
 *
 */
public interface ManagerMap {
	/**
	 * find an index for a given mdstore.
	 *
	 * @param mdId mdstore DS indentifier
	 * @return index DS identifier, of null if none
	 */
	String indexForMDStore(String mdId);

	/**
	 * Register an index associated with an mdstore.
	 *
	 * @param mdId mdstore identifier
	 * @param indexId index identifier
	 */
	void registerIndexForMDStore(String mdId, String indexId);

	/**
	 * remove an mdstore from the map and his indices.
	 *
	 * @param mdId mdstore identifier
	 */
	void removeMDStore(String mdId);

	/**
	 * remove an index from the map and his mdstores.
	 * @param indexId index id
	 */
	void removeIndex(String indexId);
}
