public static class RxCache.Builder
extends java.lang.Object
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
java.io.File |
getCacheDirectory() |
io.victoralbertos.jolyglot.JolyglotGenerics |
getJolyglot() |
java.lang.Integer |
getMaxMBPersistenceCache() |
RxCache |
persistence(java.io.File cacheDirectory,
io.victoralbertos.jolyglot.JolyglotGenerics jolyglot)
Sets the File cache system and the implementation of
JolyglotGenerics to serialise
and deserialize objects |
RxCache.Builder |
setMaxMBPersistenceCache(java.lang.Integer maxMgPersistenceCache)
Sets the max memory in megabytes for all stored records on persistence layer If not supplied,
100 megabytes will be the default option
|
boolean |
useExpiredDataIfLoaderNotAvailable() |
RxCache.Builder |
useExpiredDataIfLoaderNotAvailable(boolean useExpiredDataIfLoaderNotAvailable)
If true RxCache will serve Records already expired, instead of evict them and throw an
exception If not supplied, false will be the default option
|
public RxCache.Builder useExpiredDataIfLoaderNotAvailable(boolean useExpiredDataIfLoaderNotAvailable)
public RxCache.Builder setMaxMBPersistenceCache(java.lang.Integer maxMgPersistenceCache)
public RxCache persistence(java.io.File cacheDirectory, io.victoralbertos.jolyglot.JolyglotGenerics jolyglot)
JolyglotGenerics to serialise
and deserialize objectscacheDirectory - The File system used by the persistence implementation of Diskjolyglot - A concrete implementation of JolyglotGenericspublic boolean useExpiredDataIfLoaderNotAvailable()
public java.lang.Integer getMaxMBPersistenceCache()
public java.io.File getCacheDirectory()
public io.victoralbertos.jolyglot.JolyglotGenerics getJolyglot()