Interface ICachedLoaderJob<K>

Type Parameters:
K - cache key type
All Superinterfaces:
Runnable
All Known Implementing Classes:
JCSCachedTileLoaderJob, MapboxVectorCachedTileLoaderJob, TMSCachedTileLoaderJob, WMSCachedTileLoaderJob

public interface ICachedLoaderJob<K> extends Runnable
Interface for a job to load a single object (typically an imagery tile). It is either retrieved from cache or downloaded from the given URL (getUrl()).
  • Method Summary

    Modifier and Type
    Method
    Description
    get()
    fetches object from cache, or returns null when object is not found
    returns cache entry key
    method to get download URL for Job
    void
    submit(ICachedLoaderListener listener, boolean force)
    Submit job for background fetch, and listener will be fed with value object

    Methods inherited from interface java.lang.Runnable

    run
  • Method Details

    • getCacheKey

      returns cache entry key
      Returns:
      cache key for tile
    • getUrl

      method to get download URL for Job
      Returns:
      URL that should be fetched
      Throws:
      IOException - when could not determine the URL of the tile
    • get

      fetches object from cache, or returns null when object is not found
      Returns:
      filled tile with data or null when no cache entry found
    • submit

      void submit(ICachedLoaderListener listener, boolean force) throws IOException
      Submit job for background fetch, and listener will be fed with value object
      Parameters:
      listener - cache loader listener
      force - true if the load should skip all the caches (local & remote)
      Throws:
      IOException - on failure from getUrl() call