@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, waitclearCachepublic 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()
CachingStrategyinit in interface CachingStrategypublic java.lang.Object getObject()
CachingStrategygetObject in interface CachingStrategy@Nullable public java.lang.Object loadObject()
CachingStrategyloadObject in interface CachingStrategypublic boolean needToReload()
CachingStrategyneedToReload in interface CachingStrategypublic java.util.concurrent.locks.ReadWriteLock lock()
CachingStrategylock in interface CachingStrategy