| java.lang.Object | |||
| ↳ | com.microstrategy.utils.cache.CacheBase | ||
| ↳ | com.microstrategy.utils.cache.CustomizationsAwareCache | ||
| ↳ | com.microstrategy.utils.cache.FileCacheBase | ||
Known Direct Subclasses
|
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.
doLoad(CacheHint) and save the file's ModificationTime in a table.
When reload is call it will compare the current file's ModificationTime against the value in the table and only
if different will call load(CacheHint) again.
|
[Expand]
Inherited Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.microstrategy.utils.cache.CacheBase
| |||||||||||
|
[Expand]
Inherited Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.microstrategy.utils.cache.CacheBase
| |||||||||||
| Protected Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
FileCacheBase(String cacheName)
Base constructor, it will register the Cache in the
CacheRegistry and set is refresh
time to DEFAULT_FILE_REFRESH_TIME | |||||||||||
| Protected Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| abstract Object |
doLoad(CacheHint hint)
This abstract method is called by the load method to perform the actual loading.
| ||||||||||
| Object |
getKey(CacheHint hint)
Returns the key of the cache element based on the hint.
| ||||||||||
| String |
getPath(CacheHint hint)
Returns the path for the given hint.
| ||||||||||
| Object |
load(CacheHint hint)
Loads an element from a file and keeps track of its last modification time.
| ||||||||||
| Object |
reLoad(CacheHint hint, Object ob)
Checks if the file corresponding to the hint has changed (by comparing its last modification time
with the value stored by the load method), and if the same, just returns the same object, otherwise
it will call delegate tot he
load(CacheHint) method. | ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.microstrategy.utils.cache.CustomizationsAwareCache
| |||||||||||
From class
com.microstrategy.utils.cache.CacheBase
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
com.microstrategy.utils.cache.Cache
| |||||||||||
From interface
java.util.Observer
| |||||||||||
Base constructor, it will register the Cache in the CacheRegistry and set is refresh
time to DEFAULT_FILE_REFRESH_TIME
| cacheName | The name (id) of the Cache. |
|---|
This abstract method is called by the load method to perform the actual loading. In this method, subclasses needs to load the file and parse it, and return the object they actually want cached.
| CacheException |
|---|
Returns the key of the cache element based on the hint. In this scenario, the hint itself is the key.
| hint | the hint object. |
|---|
| CacheException |
|---|
Returns the path for the given hint. This implementation simply uses the hint value.
Loads an element from a file and keeps track of its last modification time. The actual loading
of the element is delegated to the doLoad(CacheHint) method.
| hint | the hint object. |
|---|
| CacheException |
|---|
Checks if the file corresponding to the hint has changed (by comparing its last modification time
with the value stored by the load method), and if the same, just returns the same object, otherwise
it will call delegate tot he load(CacheHint) method.
| hint | the hint object. |
|---|
| CacheException |
|---|