Class RasterDataSourceConfiguration.Cache

java.lang.Object
com.here.sdk.mapview.datasource.RasterDataSourceConfiguration.Cache
Enclosing class:
RasterDataSourceConfiguration

public static final class RasterDataSourceConfiguration.Cache extends Object

Configuration of a local data cache.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    long
    The maximum size to use on disk for the cache, in bytes.
    The path to the directory to use for the cache.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Cache(String path)
    Constructs a Cache object from the provided path and a default cache size of 32 MiB.
    Cache(String path, long diskSize)
    Constructs a Cache object from the provided path and cache size.
  • Method Summary

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • path

      @NonNull public String path

      The path to the directory to use for the cache. By default, the map gets initialized with a data path which can be fetched from SDKOptions.cachePath. The cache will be relative to this path, unless an absolute path is provided. The cache can be stored in an internal/external storage as long as the app has read/write permissions. Empty string means the data path will be used for caching. If the provided path, either as absolute path or as relative path is invalid, then caching will be disabled. There is no contraint regarding the existence of the path. If the path does not exist but is valid, it will be created.

    • diskSize

      public long diskSize

      The maximum size to use on disk for the cache, in bytes. Default is 32 MiB. This cache is independent from the map cache as defined via SDKOptions. Its size is only limited by the total device storage capacity.

  • Constructor Details

    • Cache

      public Cache(@NonNull String path)

      Constructs a Cache object from the provided path and a default cache size of 32 MiB.

      Parameters:
      path -

      The path to the directory to use for the cache. By default, the map gets initialized with a data path which can be fetched from SDKOptions.cachePath. The cache will be relative to this path, unless an absolute path is provided. The cache can be stored in an internal/external storage as long as the app has read/write permissions. Empty string means the data path will be used for caching. If the provided path, either as absolute path or as relative path is invalid, then caching will be disabled. There is no contraint regarding the existence of the path. If the path does not exist but is valid, it will be created.

    • Cache

      public Cache(@NonNull String path, long diskSize)

      Constructs a Cache object from the provided path and cache size.

      Parameters:
      path -

      The path to the directory to use for the cache. By default, the map gets initialized with a data path which can be fetched from SDKOptions.cachePath. The cache will be relative to this path, unless an absolute path is provided. The cache can be stored in an internal/external storage as long as the app has read/write permissions. Empty string means the data path will be used for caching. If the provided path, either as absolute path or as relative path is invalid, then caching will be disabled. There is no contraint regarding the existence of the path. If the path does not exist but is valid, it will be created.

      diskSize -

      The maximum size to use on disk for the cache, in bytes. Default is 32 MiB. This cache is independent from the map cache as defined via SDKOptions. Its size is only limited by the total device storage capacity.