@Deprecated public class HashMapFeedInfoCache extends Object implements FeedFetcherCache, Serializable
A very simple implementation of the FeedFetcherCache
interface.
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.
Constructor and Description |
---|
HashMapFeedInfoCache()
Deprecated.
Constructor for HashMapFeedInfoCache
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Deprecated.
Removes all items from the cache.
|
protected Map<String,SyndFeedInfo> |
createInfoCache()
Deprecated.
|
protected Object |
get(Object key)
Deprecated.
|
SyndFeedInfo |
getFeedInfo(URL feedUrl)
Deprecated.
Get a SyndFeedInfo object from the cache.
|
protected Map<String,SyndFeedInfo> |
getInfoCache()
Deprecated.
|
static FeedFetcherCache |
getInstance()
Deprecated.
Get the global instance of the cache
|
protected void |
put(String key,
SyndFeedInfo value)
Deprecated.
|
SyndFeedInfo |
remove(URL url)
Deprecated.
Removes the SyndFeedInfo identified by the url from the cache.
|
void |
setFeedInfo(URL feedUrl,
SyndFeedInfo syndFeedInfo)
Deprecated.
Add a SyndFeedInfo object to the cache
|
protected void |
setInfoCache(Map<String,SyndFeedInfo> map)
Deprecated.
The API of this class indicates that map must thread safe.
|
public HashMapFeedInfoCache()
Constructor for HashMapFeedInfoCache
Only use this if you want multiple instances of the cache. Usually getInstance() is more appropriate.
public static FeedFetcherCache getInstance()
protected Map<String,SyndFeedInfo> createInfoCache()
public SyndFeedInfo getFeedInfo(URL feedUrl)
FeedFetcherCache
getFeedInfo
in interface FeedFetcherCache
feedUrl
- The url of the feedextensions.io.FeedFetcherCache#getFeedInfo(java.net.URL)
protected void put(String key, SyndFeedInfo value)
public void setFeedInfo(URL feedUrl, SyndFeedInfo syndFeedInfo)
FeedFetcherCache
setFeedInfo
in interface FeedFetcherCache
feedUrl
- The url of the feedsyndFeedInfo
- A SyndFeedInfo for the feedextensions.io.FeedFetcherCache#setFeedInfo(java.net.URL, extensions.io.SyndFeedInfo)
protected final Map<String,SyndFeedInfo> getInfoCache()
protected final void setInfoCache(Map<String,SyndFeedInfo> map)
map
- the map to use as the info cache.public void clear()
FeedFetcherCache
clear
in interface FeedFetcherCache
com.rometools.rome.fetcher.impl.FeedFetcherCache#clear()
public SyndFeedInfo remove(URL url)
FeedFetcherCache
remove
in interface FeedFetcherCache
com.rometools.rome.fetcher.impl.FeedFetcherCache#remove(java.net.URL)
Copyright © 2017. All rights reserved.