Package de.umass.lastfm.cache
Interface ScrobbleCache
-
- All Known Implementing Classes:
FileSystemCache
public interface ScrobbleCacheAScrobbleCacheis able to cacheSubmissionDatainstances for later submission to the Last.fm servers.- Author:
- Janni Kovacs
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcacheScrobble(SubmissionData... submissions)Caches one or moreSubmissionData.voidcacheScrobble(java.util.Collection<SubmissionData> submissions)Caches a collection ofSubmissionData.voidclearScrobbleCache()Clears all cached scrobbles from this cache.booleanisEmpty()Checks if the cache contains any scrobbles.voidscrobble(Scrobbler scrobbler)Tries to scrobble all cached scrobbles.
-
-
-
Method Detail
-
cacheScrobble
void cacheScrobble(SubmissionData... submissions)
Caches one or moreSubmissionData.- Parameters:
submissions- The submissions
-
cacheScrobble
void cacheScrobble(java.util.Collection<SubmissionData> submissions)
Caches a collection ofSubmissionData.- Parameters:
submissions- The submissions
-
isEmpty
boolean isEmpty()
Checks if the cache contains any scrobbles.- Returns:
trueif this cache is empty
-
scrobble
void scrobble(Scrobbler scrobbler) throws java.io.IOException
Tries to scrobble all cached scrobbles. If it succeeds the cache will be empty afterwards. If this method fails an IOException is thrown and no entries are removed from the cache.
-
clearScrobbleCache
void clearScrobbleCache()
Clears all cached scrobbles from this cache.
-
-