Package org.deepsymmetry.beatlink.data
Interface MetadataCacheCreationListener
-
public interface MetadataCacheCreationListenerThe listener interface for receiving updates on the progress of creating a metadata cache file.
Classes that are interested in displaying a progress bar during the (potentially lengthy) process, and allowing the user to cancel it, can implement this interface.
The listener object created from that class is then passed toMetadataCache.createMetadataCache(SlotReference, int, File, MetadataCacheCreationListener)in order to be able to display progress during the process of creating the cache file. As each track is added to the cache,cacheCreationContinuing(TrackMetadata, int, int)is called, with the most recent track added, the number of tracks that have been added so far, and the total that need to be added. If it returnsfalse, the creation of the cache file will be canceled.- Author:
- James Elliott
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancacheCreationContinuing(TrackMetadata lastTrackAdded, int tracksAdded, int totalTracksToAdd)Called to inform the listener that another track has been added to the metadata cache file being created.
-
-
-
Method Detail
-
cacheCreationContinuing
boolean cacheCreationContinuing(TrackMetadata lastTrackAdded, int tracksAdded, int totalTracksToAdd)
Called to inform the listener that another track has been added to the metadata cache file being created. Allows the progress to be displayed, and for the process to be canceled if so desired.- Parameters:
lastTrackAdded- the most recent track that has been added to the metadata cache filetracksAdded- the number of tracks that have been added to the cache so fartotalTracksToAdd- the total number of tracks that need to be added to the cache- Returns:
trueif creation of the cache should continue,falseif it should be aborted
-
-