Interface IMapCache

    • Method Detail

      • addMapping

        void addMapping​(Eid key,
                        java.lang.Object value)
        Add mapping.
        Parameters:
        key - Key of the mapping
        value - Value to be stored
      • getMapping

        java.lang.Object getMapping​(Eid srcKey,
                                    Eid dstKey)
        Retrieves mapping for the provided srcKey and dstKey.
        Parameters:
        srcKey - Source Key to be looked up
        dstKey - Destination Key to be looked up
        Returns:
        Returns the object found in the cache or null if nothing is found.
      • getWidestNegativeMapping

        Eid getWidestNegativeMapping​(Eid key)
        Retrieves widest negative prefix.
        Parameters:
        key - Source Key to be looked up
        Returns:
        Returns the widest negative prefix or null if nothing is found.
      • getSubtree

        java.util.Set<Eid> getSubtree​(Eid key)
        Retrieves the subtree of a prefix.
        Parameters:
        key - Key to be looked up
        Returns:
        The set of prefixes in the subtree for the prefix
      • removeMapping

        void removeMapping​(Eid key)
        Remove mapping.
        Parameters:
        key - Key to be removed
      • addData

        void addData​(Eid key,
                     java.lang.String subKey,
                     java.lang.Object data)
        Add data for key.
        Parameters:
        key - The key for which data is inserted
        subKey - The subKey where data should be inserted
        data - The data to be stored
      • getData

        java.lang.Object getData​(Eid key,
                                 java.lang.String subKey)
        Generic retrieval of data.
        Parameters:
        key - The key where the data is stored
        subKey - The subKey where data is stored
        Returns:
        The data
      • removeData

        void removeData​(Eid key,
                        java.lang.String subKey)
        Generic removal of data.
        Parameters:
        key - The key of the data to be removed
        subKey - The subKey of the data to be removed
      • printMappings

        java.lang.String printMappings()
        Print mappings in cache. Used for testing, debugging and the karaf shell.
        Returns:
        a String consisting of all the mappings in the cache
      • prettyPrintMappings

        java.lang.String prettyPrintMappings()
        Print mappings in cache in a human friendly format.
        Returns:
        a String consisting of all the mappings in the cache