/*
- * Copyright (c) 2015 Cisco Systems, Inc. All rights reserved.
+ * Copyright (c) 2015, 2016 Cisco Systems, Inc. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
package org.opendaylight.lispflowmapping.interfaces.mapcache;
+import java.util.Set;
import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.eid.container.Eid;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.mapping.authkey.container.MappingAuthkey;
/**
* Map-cache interface.
*
* @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.
Eid getWidestNegativeMapping(Eid key);
/**
- * Remove mapping.
- *
- * @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);
-
- /**
- * Add authentication key.
- *
- * @param key
- * The key for which the authentication key is added
- * @param authKey
- * The authentication key
- */
- void addAuthenticationKey(Eid key, MappingAuthkey authKey);
-
- /**
- * Retrieve authentication key.
+ * Retrieves the subtree of a prefix.
*
* @param key
- * The key for which the authentication key is being looked up.
- * @return The authentication key.
+ * Key to be looked up
+ * @return The set of prefixes in the subtree for the prefix
*/
- MappingAuthkey getAuthenticationKey(Eid key);
+ Set<Eid> getSubtree(Eid key);
/**
- * Remove authentication key.
- *
- * @param key
- * Key for which the authentication key should be removed.
- */
- void removeAuthenticationKey(Eid key);
-
- /**
- * Update mapping registration.
+ * Remove mapping.
*
* @param key
- * The EID whose registration must be updated
- * @param timestamp
- * New timestamp for the mapping
+ * Key to be removed
*/
- void updateMappingRegistration(Eid key, Long timestamp);
+ void removeMapping(Eid key);
/**
* Add data for key.
* @return a String consisting of all the mappings in the cache
*/
String printMappings();
+
+ /**
+ * Print mappings in cache in a human friendly format.
+ *
+ * @return a String consisting of all the mappings in the cache
+ */
+ String prettyPrintMappings();
}