FileDownloadCacheFactory

public class FileDownloadCacheFactory
extends Object

java.lang.Object
   ↳ com.android.tradefed.build.FileDownloadCacheFactory


A factory for creating FileDownloadCache

Summary

Public constructors

FileDownloadCacheFactory()

Public methods

FileDownloadCache getCache(File cacheDir)

Retrieve the FileDownloadCache with the given cache directory, creating if necessary.

static FileDownloadCacheFactory getInstance()

Get the singleton instance of FileDownloadCacheFactory

Public constructors

FileDownloadCacheFactory

public FileDownloadCacheFactory ()

Public methods

getCache

public FileDownloadCache getCache (File cacheDir)

Retrieve the FileDownloadCache with the given cache directory, creating if necessary.

Note that the cache assumes that this process has exclusive access to the cacheDir directory. If multiple TF processes will be run on the same machine, they MUST each use unique cache directories.

Parameters
cacheDir File: the local filesystem directory to use as a cache

Returns
FileDownloadCache the FileDownloadCache for given cacheDir

getInstance

public static FileDownloadCacheFactory getInstance ()

Get the singleton instance of FileDownloadCacheFactory

Returns
FileDownloadCacheFactory