Back to Fresco

DiskCacheConfig.Builder

docs/javadoc/reference/com/facebook/cache/disk/DiskCacheConfig.Builder.html

3.6.018.8 KB
Original Source

Fresco

|

|

Packages | Classes

Interfaces

Classes

Annotations

Packages | Classes

Summary: Methods | Inherited Methods | [Expand All]

public static class

DiskCacheConfig.Builder

extends Object

| java.lang.Object | | ↳ | com.facebook.cache.disk.DiskCacheConfig.Builder |

Summary

Public Methods
DiskCacheConfig
DiskCacheConfig.Builder
Sets the name of the directory where the cache will be located.
DiskCacheConfig.Builder
Sets the path to the base directory.
DiskCacheConfig.Builder
DiskCacheConfig.Builder
The logger that is used to log errors made by the cache.
DiskCacheConfig.Builder
The listener for cache events.
DiskCacheConfig.Builder
The class that will contain a registry of caches to be trimmed in low disk space conditions.
DiskCacheConfig.Builder
Provides the logic to determine the eviction order based on entry's access time and size
DiskCacheConfig.Builder
DiskCacheConfig.Builder
This is the default maximum size of the cache.
DiskCacheConfig.Builder
This is the maximum size of the cache that is used when the device is low on disk space.
DiskCacheConfig.Builder
This is the maximum size of the cache when the device is extremely low on disk space.
DiskCacheConfig.Builder
Sets the version.

| [Expand] Inherited Methods | | --- | | From class java.lang.Object

| Object | clone() | | boolean | equals(Object arg0) | | void | finalize() | | final Class<?> | getClass() | | int | hashCode() | | final void | notify() | | final void | notifyAll() | | String | toString() | | final void | wait(long arg0, int arg1) | | final void | wait(long arg0) | | final void | wait() |

|

Public Methods

public DiskCacheConfig build()

public DiskCacheConfig.Builder setBaseDirectoryName(String baseDirectoryName)

Sets the name of the directory where the cache will be located.

public DiskCacheConfig.Builder setBaseDirectoryPath(File baseDirectoryPath)

Sets the path to the base directory.

A directory with the given base directory name (see setBaseDirectoryName) will be appended to this path.

public DiskCacheConfig.Builder setBaseDirectoryPathSupplier(Supplier<File> baseDirectoryPathSupplier)

public DiskCacheConfig.Builder setCacheErrorLogger(CacheErrorLogger cacheErrorLogger)

The logger that is used to log errors made by the cache.

public DiskCacheConfig.Builder setCacheEventListener(CacheEventListener cacheEventListener)

The listener for cache events.

public DiskCacheConfig.Builder setDiskTrimmableRegistry(DiskTrimmableRegistry diskTrimmableRegistry)

The class that will contain a registry of caches to be trimmed in low disk space conditions.

See DiskTrimmableRegistry.

public DiskCacheConfig.Builder setEntryEvictionComparatorSupplier(EntryEvictionComparatorSupplier supplier)

Provides the logic to determine the eviction order based on entry's access time and size

public DiskCacheConfig.Builder setIndexPopulateAtStartupEnabled(boolean indexEnabled)

public DiskCacheConfig.Builder setMaxCacheSize(long maxCacheSize)

This is the default maximum size of the cache.

public DiskCacheConfig.Builder setMaxCacheSizeOnLowDiskSpace(long maxCacheSizeOnLowDiskSpace)

This is the maximum size of the cache that is used when the device is low on disk space.

See trimToMinimum().

public DiskCacheConfig.Builder setMaxCacheSizeOnVeryLowDiskSpace(long maxCacheSizeOnVeryLowDiskSpace)

This is the maximum size of the cache when the device is extremely low on disk space.

See trimToNothing().

public DiskCacheConfig.Builder setVersion(int version)

Sets the version.

The cache lives in a subdirectory identified by this version.

+Generated by Doclava. +