|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.silverpeas.cache.service.Handler.CacheValueHandler<V>
public abstract class CacheValueHandler<V>
The aim of this abstraction is to factorize the treatment of simple uses of cache. In most cases, the use of the cache is : - 1 : checking that a value exists from the cache behind a key - 2 : if it exists, using it - 3 : if it doesn't exist, computing the value to be cached, caching it and using it User: Yohann Chastagnier Date: 30/12/13
Constructor Summary | |
---|---|
protected |
CacheValueHandler()
Default constructor. |
Method Summary | ||
---|---|---|
protected abstract V |
defaultValue()
Provides a default value to be registred in the cache. |
|
V |
get()
Gets the value from the cache. |
|
protected abstract String |
getCacheKeySuffix()
Gets the suffix key to access the value in the cache. |
|
protected abstract
|
getCacheService()
Gets the cache service. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected CacheValueHandler()
Method Detail |
---|
protected abstract <C extends SimpleCacheService> C getCacheService()
C
-
protected abstract String getCacheKeySuffix()
public V get()
protected abstract V defaultValue()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |