FeedCache

public class FeedCache implements FeedFetcherCache

This is the ‘brains’ of this module. We use the rometools com.rometools.fetcher.impl.FeedFetcherCache mechanism to determine if a feed entry content has changed and send a MotechEvent if it has.

Constructors

FeedCache

public FeedCache(FeedRecordDataService feedRecordDataService, EventRelay eventRelay, AtomClientConfigService atomClientConfigService)

Methods

clear

public void clear()

Removes all items from the cache.

getFeedInfo

public SyndFeedInfo getFeedInfo(URL feedUrl)

Get a SyndFeedInfo object from the cache.

Parameters:
  • feedUrl – The url of the feed
Returns:

A SyndFeedInfo or null if it is not in the cache

remove

public SyndFeedInfo remove(URL feedUrl)

Removes the SyndFeedInfo identified by the url from the cache.

Returns:The removed SyndFeedInfo

setFeedInfo

public synchronized void setFeedInfo(URL feedUrl, SyndFeedInfo feedInfo)

Add a SyndFeedInfo object to the cache

Parameters:
  • feedUrl – The url of the feed
  • feedInfo – A SyndFeedInfo for the feed