Interface FontAttributesCache<K extends Serializable,​E extends Throwable>

    • Method Detail

      • add

        void add​(K identifier,
                 FontAttributeSet attributes)
        Adds a pair of an identifier for a font and the FontAttributeSet for that font to the cache.
        Parameters:
        identifier - an object identifying the font.
        attributes - the FontAttributeSet for the font to be added
      • remove

        void remove​(K identifier)
        Removes the FontAttributeSet for the font identified by the given identifier. If there was no information stored for the given identifier nothing happens.
        Parameters:
        identifier - the identifier of the entry to remove the information for.
      • invalidateCache

        void invalidateCache()
        Removes all entries from the cache.
      • getAllEntries

        Map<K,​FontAttributeSet> getAllEntries()
        Get all entries which are currently stored in the cache
        Returns:
        the current state of the Map containing all entries.
      • getFontAttributesEntry

        FontAttributeSet getFontAttributesEntry​(K identifier)
        Get the FontAttributeSet cached for the font identified by the given identifier
        Parameters:
        identifier - The identifier of the font
        Returns:
        The FontAttributeSet for the font identified by the given identifier as stored in the cache.
        null may be returned if either there is no entry for the identifier or if the FontAttributeSet for the font are null.
      • writeCache

        void writeCache()
                 throws Exception
        Persists the cache.
        Throws:
        Exception - An Exception may be thrown if an error occurs while storing the data from the cache.