Make SimpleMapCache simple again
[lispflowmapping.git] / mappingservice / api / src / main / java / org / opendaylight / lispflowmapping / interfaces / mapcache / IMapCache.java
index 24108aa2cdad6be6c1d02f450a239aed5e233657..016218e0fca1ee75487417b11ad55516e32fd753 100644 (file)
@@ -24,14 +24,10 @@ public interface IMapCache {
      *
      * @param key
      *            Key of the mapping
-     * @param data
+     * @param value
      *            Value to be stored
-     * @param shouldOverwrite
-     *            Select if mappings with the same key are overwritten
-     * @param merge
-     *            Select if mappings with the same key are merged
      */
-    void addMapping(Eid key, Object data, boolean shouldOverwrite, boolean merge);
+    void addMapping(Eid key, Object value);
 
     /**
      * Retrieves mapping for the provided srcKey and dstKey.
@@ -44,21 +40,6 @@ public interface IMapCache {
      */
     Object getMapping(Eid srcKey, Eid dstKey);
 
-    /**
-     * Retrieves mapping for the provided srcKey, dstKey and a XtrId. In case the IMapCache is not a
-     * Simple Map Cache i.e. Flat Map Cache or Multi Table Map Cache, this method returns null.
-     *
-     * @param srcKey
-     *            Source Key to be looked up
-     * @param dstKey
-     *            Destination Key to be looked up
-     * @param xtrId
-     *            xtr id for which look up to be done
-     * @return Returns the object found in the cache or null if nothing is found or IMapCache is not a Simple
-     *         Map Cache.
-     */
-    Object getMapping(Eid srcKey, Eid dstKey, byte[] xtrId);
-
     /**
      * Retrieves widest negative prefix.
      *
@@ -73,11 +54,8 @@ public interface IMapCache {
      *
      * @param key
      *            Key to be removed
-     * @param overwrite
-     *            Select if mappings with the same key were overwritten on store
-     *
      */
-    void removeMapping(Eid key, boolean overwrite);
+    void removeMapping(Eid key);
 
     /**
      * Add authentication key.
@@ -106,16 +84,6 @@ public interface IMapCache {
      */
     void removeAuthenticationKey(Eid key);
 
-    /**
-     * Update mapping registration.
-     *
-     * @param key
-     *            The EID whose registration must be updated
-     * @param timestamp
-     *            New timestamp for the mapping
-     */
-    void updateMappingRegistration(Eid key, Long timestamp);
-
     /**
      * Add data for key.
      *