org.openstreetmap.josm.plugins.streetside.cache

## Class StreetsideCache

- java.lang.Object
- - org.openstreetmap.josm.data.cache.JCSCachedTileLoaderJob<java.lang.String,org.openstreetmap.josm.data.cache.BufferedImageCacheEntry>
  - - org.openstreetmap.josm.plugins.streetside.cache.StreetsideCache

- All Implemented Interfaces:
    java.lang.Runnable, org.openstreetmap.josm.data.cache.ICachedLoaderJob<java.lang.String>

      public class StreetsideCache
      extends org.openstreetmap.josm.data.cache.JCSCachedTileLoaderJob<java.lang.String,org.openstreetmap.josm.data.cache.BufferedImageCacheEntry>

  Stores the downloaded pictures locally.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `StreetsideCache.Type` Types of images.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private java.lang.String` | `id`
    `private java.net.URL` | `url`

    - ### Fields inherited from class org.openstreetmap.josm.data.cache.JCSCachedTileLoaderJob

      `ABSOLUTE_EXPIRE_TIME_LIMIT, attributes, cacheData, DEFAULT_EXPIRE_TIME, EXPIRE_TIME_SERVER_LIMIT, now, THREAD_LIMIT`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `StreetsideCache(java.lang.String id, StreetsideCache.Type type)` Main constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected org.openstreetmap.josm.data.cache.BufferedImageCacheEntry` | `createCacheEntry(byte[] content)`
    `java.lang.String` | `getCacheKey()`
    `java.net.URL` | `getUrl()`
    `protected boolean` | `isObjectLoadable()`

    - ### Methods inherited from class org.openstreetmap.josm.data.cache.JCSCachedTileLoaderJob

      `cacheAsEmpty, cancelOutstandingTasks, executionFinished, get, getServerKey, handleJobCancellation, isCacheElementValid, isResponseLoadable, parseHeaders, run, setFinishedTask, submit`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### url

          private final java.net.URL url

    - #### id

          private final java.lang.String id

  - ### Constructor Detail

    - #### StreetsideCache

          public StreetsideCache(java.lang.String id,
                                 StreetsideCache.Type type)

      Main constructor.
      Parameters:
        `id` - The id of the image.
        `type` - The type of image that must be downloaded (THUMBNAIL or FULL_IMAGE).

  - ### Method Detail

    - #### getCacheKey

          public java.lang.String getCacheKey()

    - #### getUrl

          public java.net.URL getUrl()

    - #### createCacheEntry

          protected org.openstreetmap.josm.data.cache.BufferedImageCacheEntry createCacheEntry(byte[] content)

      Specified by:
        `createCacheEntry` in class `org.openstreetmap.josm.data.cache.JCSCachedTileLoaderJob<java.lang.String,org.openstreetmap.josm.data.cache.BufferedImageCacheEntry>`

    - #### isObjectLoadable

          protected boolean isObjectLoadable()

      Overrides:
        `isObjectLoadable` in class `org.openstreetmap.josm.data.cache.JCSCachedTileLoaderJob<java.lang.String,org.openstreetmap.josm.data.cache.BufferedImageCacheEntry>`

JOSM Plugins