|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.clapper.curn.FeedCache
public class FeedCache
Defines the in-memory format of the curn cache, and provides methods for saving and restoring the cache.
Curn,
RSSChannel| Method Summary | |
|---|---|
void |
addToCache(java.lang.String uniqueID,
java.net.URL url,
java.util.Date pubDate,
FeedInfo parentFeed)
Add (or replace) a cached URL. |
boolean |
containsID(java.lang.String id)
Determine whether the cache contains an entry with the specified unique ID. |
boolean |
containsURL(java.net.URL url)
Determine whether the cache contains the specified URL. |
java.util.Collection<FeedCacheEntry> |
getAllEntries()
Get all entries in the cache, in no particular order. |
FeedCacheEntry |
getEntry(java.lang.String id)
Get an entry from the cache by its unique ID. |
FeedCacheEntry |
getEntryByURL(java.net.URL url)
Get an entry from the cache by its URL. |
void |
setCurrentTime(java.util.Date datetime)
Set the cache's notion of the current time, which affects how elements are pruned when loaded from the cache. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public boolean containsID(java.lang.String id)
id - the ID to check.
public boolean containsURL(java.net.URL url)
url - the URL to check. This method normalizes it.
public FeedCacheEntry getEntry(java.lang.String id)
id - the unique ID to check
public FeedCacheEntry getEntryByURL(java.net.URL url)
url - the URL
public void addToCache(java.lang.String uniqueID,
java.net.URL url,
java.util.Date pubDate,
FeedInfo parentFeed)
uniqueID - the unique ID string for the cache entry, or null.
If null, the URL is used as the unique ID.url - the URL to cache. May be an individual item URL, or
the URL for an entire feed.pubDate - the publication date, if known; or nullparentFeed - the associated feedCurnUtil.normalizeURL(java.net.URL)public java.util.Collection<FeedCacheEntry> getAllEntries()
public void setCurrentTime(java.util.Date datetime)
datetime - the time to use
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||