|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.sun.syndication.fetcher.impl.HashMapFeedInfoCache
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.
| Field Summary | |
(package private) static HashMapFeedInfoCache |
_instance
|
private Map |
infoCache
|
static long |
serialVersionUID
|
| Constructor Summary | |
HashMapFeedInfoCache()
Constructor for HashMapFeedInfoCache Only use this if you want multiple instances of the cache. |
|
| Method Summary | |
protected Object |
get(Object key)
|
SyndFeedInfo |
getFeedInfo(URL feedUrl)
Get a SyndFeedInfo object from the cache. |
protected Map |
getInfoCache()
|
static FeedFetcherCache |
getInstance()
Get the global instance of the cache |
protected void |
put(Object key,
Object value)
|
void |
setFeedInfo(URL feedUrl,
SyndFeedInfo syndFeedInfo)
Add a SyndFeedInfo object to the cache |
protected void |
setInfoCache(Map map)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final long serialVersionUID
static HashMapFeedInfoCache _instance
private Map infoCache
| Constructor Detail |
public HashMapFeedInfoCache()
Constructor for HashMapFeedInfoCache
Only use this if you want multiple instances of the cache. Usually getInstance() is more appropriate.
| Method Detail |
public static FeedFetcherCache getInstance()
protected Object get(Object key)
public SyndFeedInfo getFeedInfo(URL feedUrl)
FeedFetcherCache
getFeedInfo in interface FeedFetcherCachefeedUrl - The url of the feed
FeedFetcherCache.getFeedInfo(java.net.URL)
protected void put(Object key,
Object value)
public void setFeedInfo(URL feedUrl,
SyndFeedInfo syndFeedInfo)
FeedFetcherCache
setFeedInfo in interface FeedFetcherCachefeedUrl - The url of the feedsyndFeedInfo - A SyndFeedInfo for the feedFeedFetcherCache.setFeedInfo(java.net.URL, com.sun.syndication.fetcher.impl.SyndFeedInfo)protected Map getInfoCache()
protected void setInfoCache(Map map)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||