public class DatasetBuilder.Cachable<T extends DatasetBuilder.Cachable<T>> extends Object
| Modifier and Type | Method and Description |
|---|---|
T |
configureCache(DatasetBuilder.CacheType cacheType,
ICacheOptions options)
Set the builder and size parameter for the specified cache type
|
T |
configureCaches(Map<DatasetBuilder.CacheType,ICacheOptions> map)
Set builders and size parameters for multiple cache types
|
T |
configureCachesFromCacheSet(DatasetBuilder.CacheSet set)
Add caches from a CacheSet
To add, say, your own Template with the default LruCache
do as follows:
|
T |
configureCachesFromTemplate(DatasetBuilder.CacheTemplate template)
Add cache configuration from a predefined cache template.
|
T |
configureDefaultCaches()
Initialises the
DatasetBuilder with the default cache configuration. |
T |
setCacheBuilder(DatasetBuilder.CacheType cacheType,
ICacheBuilder builder)
Set a cache builder to use for the specified type of cache
|
T |
setCacheBuilders(Map<DatasetBuilder.CacheType,ICacheBuilder> map)
Set cache builders for multiple cache types
|
T |
setCacheSize(DatasetBuilder.CacheType cacheType,
int cacheSize)
Set a size to use for the specified type of cache
|
T |
setCacheSizes(Map<DatasetBuilder.CacheType,Integer> map)
Set cache sizes for multiple cache types
|
public T setCacheBuilder(DatasetBuilder.CacheType cacheType, ICacheBuilder builder)
cacheType - The cache typebuilder - The cache builder used to create the cache.
If null is passed then the specified cache type
will operate without a cache.DatasetBuilderpublic T setCacheBuilders(Map<DatasetBuilder.CacheType,ICacheBuilder> map)
map - A map of cache types and associated cache builders.
Where a null builder is supplied the associated cache
type will operate without a cacheDatasetBuilderpublic T setCacheSize(DatasetBuilder.CacheType cacheType, int cacheSize)
cacheType - The cache typecacheSize - The size used when creating the cache.DatasetBuilderpublic T setCacheSizes(Map<DatasetBuilder.CacheType,Integer> map)
map - A map of cache types and associated cache sizes.DatasetBuilderpublic T configureCache(DatasetBuilder.CacheType cacheType, ICacheOptions options)
cacheType - the typeoptions - An ICacheOptions object that
specifies a cache builder and size to use when
constructing the specified cache typepublic T configureCaches(Map<DatasetBuilder.CacheType,ICacheOptions> map)
map - a map of ICacheBuilder and size parameters
to use when constructing each cache typepublic T configureDefaultCaches()
DatasetBuilder with the default cache configuration.
Individual elements of this configuration can be overridden by using the
ConfigureCache, ConfigureCaches, SetCacheBuilder and SetCacheBuilders methodspublic T configureCachesFromTemplate(DatasetBuilder.CacheTemplate template)
template - A DatasetBuilder.CacheTemplate that defines the desired
cache configurationpublic T configureCachesFromCacheSet(DatasetBuilder.CacheSet set)
addCachesFromCacheSet(myCacheSet, LruCache.builder())
set - the templateCopyright © 2017 51Degrees. All rights reserved.