@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, wait
init
public static final java.lang.String NAME
public java.lang.Object getObject()
CachingStrategy
getObject
in interface CachingStrategy
public java.lang.Object loadObject()
CachingStrategy
loadObject
in interface CachingStrategy
public java.util.concurrent.locks.ReadWriteLock lock()
CachingStrategy
lock
in interface CachingStrategy
public boolean needToReload()
CachingStrategy
needToReload
in interface CachingStrategy
public long getUpdateIntervalMs()
public void setUpdateIntervalMs(long updateIntervalMs)
public boolean isUpdateSynchronously()
public void setUpdateSynchronously(boolean updateSynchronously)
public void clearCache()
CachingStrategy
clearCache
in interface CachingStrategy