Known Direct Subclasses
ConfigurationFilesCache |
This is the Cache of configuration files. |
FileCacheBase |
The FileCacheBase is the base class for cached objects that depend on a single file,
that is, the file they depend on cannot be customized through the plug-ins infrastructure,
nor can it internally depend on other configuration files. |
PropertiesCache |
|
ResourceBundleCache |
|
|
Known Indirect Subclasses
|
Class Overview
This is an abstract base class for those Caches whose content can
be affected by a customization. Typically, it is used by file-caches
like the configuration files or resource bundles caches.
The constructor register this Cache as an observer of the Customizations
class. When customization changes (for example, when customizations are added/removed
at runtime), the Customization
class will inform to all its observers about the change
through the update(Observable, Object)
method. If the observed object has changed, the cache will
simply be cleared.
Summary
[Expand]
Inherited Constants |
From class
com.microstrategy.utils.cache.CacheBase
int |
DEFAULT_FILE_REFRESH_TIME |
Refresh time constant indicating that default file refreshing time from the CacheRegistry
shall be used for this cache. |
int |
DEFAULT_REFRESH_TIME |
Refresh time constant indicating that default refresh time from the CacheRegistry
shall be used for this cache. |
int |
DEFAULT_STATISTIC_TIME |
Statistic time constant indicating that default statistic time from the CacheRegistry
shall be used for this cache. |
int |
DEFAULT_SYS_TIMEOUT |
|
int |
DEFAULT_USER_TIMEOUT |
Timeout constant indicating that default timeout value from the CacheRegistry
shall be used for this cache. |
int |
NO_REFRESH |
Refresh time constant indicating that cache members are never automatically reloaded. |
int |
NO_STATISTIC |
Statistic time constant indicating that cache shall not automatically log statistic. |
int |
NO_TIMEOUT |
Timeout constant indicating that cache members shall never timeout. |
|
Public Constructors |
|
CustomizationsAwareCache(String cacheName, int timeOut, int refreshTime)
Base constructor, will register the Cache in the CacheRegistry and will
add itself as an observer of the Customizations class.
|
Public Methods |
void
|
update(Observable o, Object arg)
When the observer changes, this method simply clears the cache.
|
[Expand]
Inherited Methods |
From class
com.microstrategy.utils.cache.CacheBase
boolean
|
canUpdate(CacheHint hint)
Overridable.
|
synchronized
void
|
clear()
Clears the cache - all entries are removed.
|
void
|
close()
Un-register cache from the cache registry.
|
synchronized
void
|
configure(Properties prop)
|
boolean
|
contains(CacheHint hint)
|
void
|
delete(CacheHint hint)
Removes object from the cache and persistent storage
|
Object
|
get(CacheHint hint)
Finds and returns cached object based on the hint.
|
abstract
Object
|
getKey(CacheHint hint)
Overridable.
|
String
|
getName()
Returns cache name.
|
synchronized
int
|
getRefreshTime()
Returns cache refresh time in seconds.
|
synchronized
int
|
getStatisticTime()
Returns the statistic frequency in seconds.
|
synchronized
int
|
getTimeout()
Returns cache timeout in seconds.
|
abstract
Object
|
load(CacheHint hint)
Overridable.
|
void
|
logStatistic()
Writes cache statistic message to the log.
|
void
|
onHintClose(CacheHint hint)
This method is supposed to be called by the hint object when it is closed.
|
void
|
onTimer()
This method is periodically called by the cache registry.
|
void
|
put(CacheHint hint, Object ob)
Puts the object in the cache.
|
Object
|
reLoad(CacheHint hint, Object ob)
Overridable.
|
Object
|
refresh(CacheHint hint)
Re-loads object from the persistent storage
|
void
|
remove(CacheHint hint)
Removes an object from the cache.
|
void
|
save(CacheHint hint, Object ob)
Puts the object in the cache and stores it in the memory.
|
synchronized
void
|
setRefreshTime(int value)
Sets cache refresh time in seconds.
|
synchronized
void
|
setStatisticTime(int value)
Sets the statistic frequency in seconds.
|
synchronized
void
|
setTimeout(int value)
Sets cache timeout in seconds.
|
synchronized
int
|
size()
Returns cache size.
|
void
|
store(CacheHint hint, Object ob)
Overridable.
|
void
|
unLoad(CacheHint hint)
Overridable.
|
|
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
From interface
com.microstrategy.utils.cache.Cache
abstract
void
|
clear()
Clears the cache - all entries are removed.
|
abstract
void
|
close()
Un-register cache from the cache registry.
|
abstract
boolean
|
contains(CacheHint hint)
|
abstract
void
|
delete(CacheHint hint)
Removes object from the cache and persistent storage
|
abstract
Object
|
get(CacheHint hint)
Finds and returns cached object based on the hint.
|
abstract
String
|
getName()
Returns cache name.
|
abstract
void
|
onHintClose(CacheHint hint)
This method is supposed to be called by the hint object when it is closed.
|
abstract
void
|
put(CacheHint hint, Object ob)
Puts the object in the cache.
|
abstract
Object
|
refresh(CacheHint hint)
Re-loads object from the persistent storage
|
abstract
void
|
remove(CacheHint hint)
Removes an object from the cache.
|
abstract
void
|
save(CacheHint hint, Object ob)
Puts the object in the cache and stores it in the memory.
|
|
From interface
java.util.Observer
abstract
void
|
update(Observable arg0, Object arg1)
|
|
Public Constructors
public
CustomizationsAwareCache
(String cacheName, int timeOut, int refreshTime)
Base constructor, will register the Cache in the CacheRegistry
and will
add itself as an observer of the Customizations class.
Parameters
cacheName |
The name (id) of the Cache. |
timeOut |
Time (in seconds) after which the cache expires. |
refreshTime |
Time (in seconds) before after which the cache needs to be refreshed.
|
Public Methods
public
void
update
(Observable o, Object arg)
When the observer changes, this method simply clears the cache.