@Component(value="cuba_ConfigCacheStrategy") public class ConfigCacheStrategy extends java.lang.Object implements CachingStrategy
SourceType.DATABASE.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
NAME |
| Constructor and Description |
|---|
ConfigCacheStrategy() |
| Modifier and Type | Method and Description |
|---|---|
void |
clearCache()
Clears cache strategy data if supported by implementation.
|
java.lang.Object |
getObject()
Return cached object
|
long |
getUpdateIntervalMs() |
boolean |
isUpdateSynchronously() |
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
|
void |
setUpdateIntervalMs(long updateIntervalMs) |
void |
setUpdateSynchronously(boolean updateSynchronously) |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinitpublic static final java.lang.String NAME
public java.lang.Object getObject()
CachingStrategygetObject in interface CachingStrategypublic java.lang.Object loadObject()
CachingStrategyloadObject in interface CachingStrategypublic java.util.concurrent.locks.ReadWriteLock lock()
CachingStrategylock in interface CachingStrategypublic boolean needToReload()
CachingStrategyneedToReload in interface CachingStrategypublic long getUpdateIntervalMs()
public void setUpdateIntervalMs(long updateIntervalMs)
public boolean isUpdateSynchronously()
public void setUpdateSynchronously(boolean updateSynchronously)
public void clearCache()
CachingStrategyclearCache in interface CachingStrategy