|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@Deprecated public interface ICacheManager
This interface is mainly used for mocking/testing. Developpers should use
directly the class CacheManager
and should not have to implement this
interface. Defines the behavior of a cache manager, a bus of
ObjectPersister
.
Method Summary | ||
---|---|---|
void |
addPersister(Persister persister)
Deprecated. |
|
|
getAllCacheKeys(Class<T> clazz)
Deprecated. Get all cache keys associated to a given class. |
|
Date |
getDateOfDataInCache(Class<?> clazz,
Object cacheKey)
Deprecated. The date at which given data has been stored last in cache. |
|
boolean |
isDataInCache(Class<?> clazz,
Object cacheKey,
long maxTimeInCacheBeforeExpiry)
Deprecated. Test whether or not some data is in cache. |
|
|
loadAllDataFromCache(Class<T> clazz)
Deprecated. Loads all data stored in cache for a given class. |
|
|
loadDataFromCache(Class<T> clazz,
Object cacheKey,
long maxTimeInCacheBeforeExpiry)
Deprecated. Loads an instance of a class clazz, that is stored in cache under the key cacheKey. |
|
void |
removeAllDataFromCache()
Deprecated. Removes all data in the cache. |
|
void |
removeAllDataFromCache(Class<?> clazz)
Deprecated. Removes all data in the cache that are instances of class clazz. |
|
boolean |
removeDataFromCache(Class<?> clazz,
Object cacheKey)
Deprecated. Removes a given data in the cache that is an instance of class clazz. |
|
void |
removePersister(Persister persister)
Deprecated. |
|
|
saveDataToCacheAndReturnData(T data,
Object cacheKey)
Deprecated. Save an instance of a given class, into the cache identified by cacheKey. |
Method Detail |
---|
void addPersister(Persister persister)
void removePersister(Persister persister)
<T> List<Object> getAllCacheKeys(Class<T> clazz)
clazz
- the class for which to get all cache keys.
<T> T loadDataFromCache(Class<T> clazz, Object cacheKey, long maxTimeInCacheBeforeExpiry) throws CacheLoadingException, CacheCreationException
clazz
- the class of the object that is supposed to be stored in
cache.cacheKey
- the key used to identify this item in cache.maxTimeInCacheBeforeExpiry
- the maximum time (in ms) an item can be stored in cache before
being considered expired.
CacheLoadingException
CacheCreationException
<T> List<T> loadAllDataFromCache(Class<T> clazz) throws CacheLoadingException, CacheCreationException
clazz
- the class for which to get all data stored in cache.
CacheLoadingException
CacheCreationException
<T> T saveDataToCacheAndReturnData(T data, Object cacheKey) throws CacheCreationException, CacheSavingException
ObjectPersister
can modify the data they receive before
saving it. Most ObjectPersister
instances will just save the data
as-is, in this case, they can even return it and save it asynchronously
in a background thread for a better efficiency.
data
- the data to be saved in cache.cacheKey
- the key used to identify this item in cache.
CacheCreationException
CacheSavingException
boolean isDataInCache(Class<?> clazz, Object cacheKey, long maxTimeInCacheBeforeExpiry) throws CacheCreationException
clazz
- the class of the object that is supposed to be stored in
cache.cacheKey
- the key used to identify this item in cache.maxTimeInCacheBeforeExpiry
- the maximum time (in ms) an item can be stored in cache before
being considered expired.
CacheCreationException
Date getDateOfDataInCache(Class<?> clazz, Object cacheKey) throws CacheCreationException, CacheLoadingException
clazz
- the class of the object that is supposed to be stored in
cache.cacheKey
- the key used to identify this item in cache.
CacheCreationException
CacheLoadingException
boolean removeDataFromCache(Class<?> clazz, Object cacheKey)
clazz
- the class of the data to be removed.cacheKey
- the identifier of the data to be removed from cache.
void removeAllDataFromCache(Class<?> clazz)
clazz
- the class of the data to be removed.void removeAllDataFromCache()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |