Package 

Interface IFilesystemCache


  • 
    public interface IFilesystemCache
    
                        

    Represents a write-only interface into a file system cache.

    • Method Summary

      Modifier and Type Method Description
      abstract boolean saveFile(ITileSource pTileSourceInfo, long pMapTileIndex, InputStream pStream, Long pExpirationTime) Save an InputStream as the specified tile in the file system cache for the specified tilesource.
      abstract boolean exists(ITileSource pTileSourceInfo, long pMapTileIndex) return true if the map file for download already exists
      abstract void onDetach() Used when the map engine is shutdown, use it to perform any clean up activities and to terminateany background threads
      abstract boolean remove(ITileSource tileSource, long pMapTileIndex) Removes a tile from the cache, see issuehttps://github.
      abstract Long getExpirationTimestamp(ITileSource pTileSource, long pMapTileIndex) Gets the cache expiration timestamp of a tile
      abstract Drawable loadTile(ITileSource pTileSource, long pMapTileIndex) Gets the tile drawable
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • saveFile

         abstract boolean saveFile(ITileSource pTileSourceInfo, long pMapTileIndex, InputStream pStream, Long pExpirationTime)

        Save an InputStream as the specified tile in the file system cache for the specified tilesource.

        Parameters:
        pTileSourceInfo - a tile source
        pMapTileIndex - a tile
        pStream - an InputStream
      • exists

         abstract boolean exists(ITileSource pTileSourceInfo, long pMapTileIndex)

        return true if the map file for download already exists

      • onDetach

         abstract void onDetach()

        Used when the map engine is shutdown, use it to perform any clean up activities and to terminateany background threads

      • remove

         abstract boolean remove(ITileSource tileSource, long pMapTileIndex)

        Removes a tile from the cache, see issuehttps://github.com/osmdroid/osmdroid/issues/426