Package com.rometools.fetcher.impl
Class HashMapFeedInfoCache
- java.lang.Object
-
- com.rometools.fetcher.impl.HashMapFeedInfoCache
-
- All Implemented Interfaces:
FeedFetcherCache,Serializable
- Direct Known Subclasses:
LinkedHashMapFeedInfoCache
@Deprecated public class HashMapFeedInfoCache extends Object implements FeedFetcherCache, Serializable
Deprecated.ROME Fetcher will be dropped in the next major version of ROME (version 2). For more information and some migration hints, please have a look at our detailed explanation.A very simple implementation of the
FeedFetcherCacheinterface.This implementation uses a HashMap to cache retrieved feeds. This implementation is most suitible for sort term (client aggregator?) use, as the memory usage will increase over time as the number of feeds in the cache increases.
- Author:
- Nick Lothian
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description HashMapFeedInfoCache()Deprecated.Constructor for HashMapFeedInfoCache
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidclear()Deprecated.Removes all items from the cache.protected Map<String,SyndFeedInfo>createInfoCache()Deprecated.protected Objectget(Object key)Deprecated.SyndFeedInfogetFeedInfo(URL feedUrl)Deprecated.Get a SyndFeedInfo object from the cache.protected Map<String,SyndFeedInfo>getInfoCache()Deprecated.static FeedFetcherCachegetInstance()Deprecated.Get the global instance of the cacheprotected voidput(String key, SyndFeedInfo value)Deprecated.SyndFeedInforemove(URL url)Deprecated.Removes the SyndFeedInfo identified by the url from the cache.voidsetFeedInfo(URL feedUrl, SyndFeedInfo syndFeedInfo)Deprecated.Add a SyndFeedInfo object to the cacheprotected voidsetInfoCache(Map<String,SyndFeedInfo> map)Deprecated.The API of this class indicates that map must thread safe.
-
-
-
Method Detail
-
getInstance
public static FeedFetcherCache getInstance()
Deprecated.Get the global instance of the cache- Returns:
- an implementation of FeedFetcherCache
-
createInfoCache
protected Map<String,SyndFeedInfo> createInfoCache()
Deprecated.
-
getFeedInfo
public SyndFeedInfo getFeedInfo(URL feedUrl)
Deprecated.Description copied from interface:FeedFetcherCacheGet a SyndFeedInfo object from the cache.- Specified by:
getFeedInfoin interfaceFeedFetcherCache- Parameters:
feedUrl- The url of the feed- Returns:
- A SyndFeedInfo or null if it is not in the cache
- See Also:
extensions.io.FeedFetcherCache#getFeedInfo(java.net.URL)
-
put
protected void put(String key, SyndFeedInfo value)
Deprecated.
-
setFeedInfo
public void setFeedInfo(URL feedUrl, SyndFeedInfo syndFeedInfo)
Deprecated.Description copied from interface:FeedFetcherCacheAdd a SyndFeedInfo object to the cache- Specified by:
setFeedInfoin interfaceFeedFetcherCache- Parameters:
feedUrl- The url of the feedsyndFeedInfo- A SyndFeedInfo for the feed- See Also:
extensions.io.FeedFetcherCache#setFeedInfo(java.net.URL, extensions.io.SyndFeedInfo)
-
getInfoCache
protected final Map<String,SyndFeedInfo> getInfoCache()
Deprecated.
-
setInfoCache
protected final void setInfoCache(Map<String,SyndFeedInfo> map)
Deprecated.The API of this class indicates that map must thread safe. In other words, be sure to wrap it in a synchronized map unless you know what you are doing.- Parameters:
map- the map to use as the info cache.
-
clear
public void clear()
Deprecated.Description copied from interface:FeedFetcherCacheRemoves all items from the cache.- Specified by:
clearin interfaceFeedFetcherCache- See Also:
com.rometools.rome.fetcher.impl.FeedFetcherCache#clear()
-
remove
public SyndFeedInfo remove(URL url)
Deprecated.Description copied from interface:FeedFetcherCacheRemoves the SyndFeedInfo identified by the url from the cache.- Specified by:
removein interfaceFeedFetcherCache- Returns:
- The removed SyndFeedInfo
- See Also:
com.rometools.rome.fetcher.impl.FeedFetcherCache#remove(java.net.URL)
-
-