public class DefaultCacheRepository extends java.lang.Object implements CacheRepository
| Constructor and Description |
|---|
DefaultCacheRepository(java.io.File userHomeDir,
java.io.File projectCacheDir,
CacheUsage cacheUsage,
CacheFactory factory) |
| Modifier and Type | Method and Description |
|---|---|
DirectoryCacheBuilder |
cache(java.lang.String key)
Returns a builder for the cache with the given key.
|
<K,V> ObjectCacheBuilder<V,PersistentIndexedCache<K,V>> |
indexedCache(java.lang.Class<K> keyType,
java.lang.Class<V> elementType,
java.lang.String key)
Returns a builder for the indexed cache with the given key.
|
<E> ObjectCacheBuilder<E,PersistentStateCache<E>> |
stateCache(java.lang.Class<E> elementType,
java.lang.String key)
Returns a builder for the state cache with the given key.
|
DirectoryCacheBuilder |
store(java.lang.String key)
Returns a builder for the store with the given key.
|
public DefaultCacheRepository(java.io.File userHomeDir,
java.io.File projectCacheDir,
CacheUsage cacheUsage,
CacheFactory factory)
public DirectoryCacheBuilder store(java.lang.String key)
CacheRepositoryA store is always opened with a shared lock, so that it can be accessed by multiple processes. It is the caller's responsibility to coordinate access to the cache.
store in interface CacheRepositorykey - The cache key.public DirectoryCacheBuilder cache(java.lang.String key)
CacheRepositoryA state cache is always opened with a shared lock, so that it can be accessed by multiple processes. It is the caller's responsibility to coordinate access to the cache.
cache in interface CacheRepositorykey - The cache key.public <E> ObjectCacheBuilder<E,PersistentStateCache<E>> stateCache(java.lang.Class<E> elementType, java.lang.String key)
CacheRepositoryA state cache is always opened with an exclusive lock, so that it can be accessed only by this process.
stateCache in interface CacheRepositoryelementType - The type of element kept in the cache.key - The cache key.public <K,V> ObjectCacheBuilder<V,PersistentIndexedCache<K,V>> indexedCache(java.lang.Class<K> keyType, java.lang.Class<V> elementType, java.lang.String key)
CacheRepositoryAn indexed cache is always opened with an exclusive lock, so that it can be accessed only by this process.
indexedCache in interface CacheRepositorykeyType - The type of key kept in the cache.elementType - The type of element kept in the cache.key - The cache key.Copyright © 2013. All rights reserved