de.umass.lastfm.cache
Interface ScrobbleCache


Deprecated. The 1.2.x scrobble protocol has now been deprecated in favour of the 2.0 protocol which is part of the Last.fm web services API.

public interface ScrobbleCache

A ScrobbleCache is able to cache SubmissionData instances for later submission to the Last.fm servers.

Author:
Janni Kovacs

Method Summary
 void cacheScrobble(Collection submissions)
          Deprecated. Caches a collection of SubmissionData.
 void cacheScrobble(SubmissionData[] submissions)
          Deprecated. Caches one or more SubmissionData.
 void clearScrobbleCache()
          Deprecated. Clears all cached scrobbles from this cache.
 boolean isEmpty()
          Deprecated. Checks if the cache contains any scrobbles.
 void scrobble(Scrobbler scrobbler)
          Deprecated. Tries to scrobble all cached scrobbles.
 

Method Detail

cacheScrobble

public void cacheScrobble(SubmissionData[] submissions)
Deprecated. 
Caches one or more SubmissionData.

Parameters:
submissions - The submissions

cacheScrobble

public void cacheScrobble(Collection submissions)
Deprecated. 
Caches a collection of SubmissionData.

Parameters:
submissions - The submissions

isEmpty

public boolean isEmpty()
Deprecated. 
Checks if the cache contains any scrobbles.

Returns:
true if this cache is empty

scrobble

public void scrobble(Scrobbler scrobbler)
              throws IOException
Deprecated. 
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.

Parameters:
scrobbler - A Scrobbler instance
Throws:
IOException - on I/O errors
IllegalStateException - if the Scrobbler is not fully initialized (i.e. no handshake performed)

clearScrobbleCache

public void clearScrobbleCache()
Deprecated. 
Clears all cached scrobbles from this cache.