@Component(value="cuba_DynamicAttributesCacheStrategy") public class DynamicAttributesCacheStrategy extends java.lang.Object implements CachingStrategy
Modifier and Type | Field and Description |
---|---|
protected CacheUserSessionProvider |
cacheUserSessionProvider |
protected ClientCacheManager |
clientCacheManager |
protected DynamicAttributesCache |
dynamicAttributesCache |
static java.lang.String |
NAME |
protected boolean |
needToValidateCache |
protected java.util.concurrent.locks.ReadWriteLock |
readWriteLock |
Constructor and Description |
---|
DynamicAttributesCacheStrategy() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getObject()
Return cached object
|
void |
init()
Method for strategy initialization
Invoked at first login, so security context is available
|
java.lang.Object |
loadObject()
Refresh cached object
|
java.util.concurrent.locks.ReadWriteLock |
lock()
Return lock used to provide caching thread safety
|
boolean |
needToReload()
Indicate whether cached object should be refreshed or not
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clearCache
public static final java.lang.String NAME
@Inject protected ClientCacheManager clientCacheManager
@Inject protected CacheUserSessionProvider cacheUserSessionProvider
protected java.util.concurrent.locks.ReadWriteLock readWriteLock
protected DynamicAttributesCache dynamicAttributesCache
protected volatile boolean needToValidateCache
public void init()
CachingStrategy
init
in interface CachingStrategy
public java.lang.Object getObject()
CachingStrategy
getObject
in interface CachingStrategy
@Nullable public java.lang.Object loadObject()
CachingStrategy
loadObject
in interface CachingStrategy
public boolean needToReload()
CachingStrategy
needToReload
in interface CachingStrategy
public java.util.concurrent.locks.ReadWriteLock lock()
CachingStrategy
lock
in interface CachingStrategy