java.lang.Object | |
↳ | com.microstrategy.web.app.utils.cache.ResourceCacheManager |
The ResourceCacheManager
is basically a wrapper of the ResourceCache
.
It provides helper methods to access Resource
objects without having to
catch CacheException or to create CacheHints on the fly.
Copyright © 2002 MicroStrategy, Inc.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Object |
getCachedObject(String key)
This method is deprecated.
This class should only be used to access Resources. Use
getResourceObject(String)
| ||||||||||
FileLoader |
getFileLoader()
This method is deprecated.
FileLoader usage is now recommended as a singleton. You can access it by:
FileLoader.getInstance();
| ||||||||||
static ResourceCacheManager |
getInstance()
Returns the instance of the ResourceCacheManager class
| ||||||||||
Resource |
getResourceObject(String filePath, String encode, String localeID)
Obtains the cached object held by the
ResourceCache mapping table | ||||||||||
Resource |
getResourceObject(String filePath)
Obtains the cached object held by the
ResourceCache mapping table | ||||||||||
Document |
getResourceObjectDocument(String filePath, String encode, String localeID)
Obtains the DOM Document contents of the cached object
held by the
ResourceCache mapping table. | ||||||||||
Document |
getResourceObjectDocument(String filePath)
Obtains the DOM Document contents of the cached object
held by the
ResourceCache mapping table. | ||||||||||
String |
getResourceObjectString(String filePath, String encode, String localeID)
Obtains the string contents of the cached object
held by the
ResourceCache mapping table | ||||||||||
String |
getResourceObjectString(String filePath)
Obtains the string contents of the cached object
held by the
ResourceCache mapping table | ||||||||||
void |
init(FileLoader fileLoader)
This method is deprecated.
FileLoader usage is now recommended as a singleton. The FileLoader should
now always be accessed by:
FileLoader.getInstance();
| ||||||||||
void |
storeObjectToCache(String key, Object resourceObject)
This method is deprecated.
Should not be called explicitly. To cache objects, callers should implement their own Cache
| ||||||||||
void |
storeResourceObject(String key, String encode, String localeID, Object resourceObject)
This method is deprecated.
Should not be called explicitly. To cache objects, callers should implement their own Cache
| ||||||||||
void |
storeResourceObject(String key, Object resourceObject)
This method is deprecated.
Should not be called explicitly. To cache objects, callers should implement their own Cache
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
This method is deprecated.
This class should only be used to access Resources. Use getResourceObject(String)
Obtains the cached object held by the ResourceCache
mapping table
key | Unique identifier for the cached object. |
---|
This method is deprecated.
FileLoader usage is now recommended as a singleton. You can access it by: FileLoader.getInstance();
Gets the file loader that the cache mapping will use to load files from the
file system.
FileLoader
instaceReturns the instance of the ResourceCacheManager class
ResourceCacheManager
instance
Obtains the cached object held by the ResourceCache
mapping table
filePath | Location of the corresponding Resource |
---|---|
encode | the encoding used to open the file resource object |
localeID | for the file. Notice this parameter is actually not used anymore. |
Obtains the cached object held by the ResourceCache
mapping table
filePath | Location of the corresponding Resource |
---|
Obtains the DOM Document contents of the cached object
held by the ResourceCache
mapping table. Not thread
safe to use the Document object without synchronization.
Strongly suggest synchronizing on the owning Resource
object. This method will likely be deprecated in the future.
Please use getResourceObject(String, String, String)
instead.
filePath | Location of the corresponding Resource |
---|---|
encode | the encoding used to open the file resource object |
localeID | for the file. Notice this parameter is actually not used anymore. |
Obtains the DOM Document contents of the cached object
held by the ResourceCache
mapping table. Not thread
safe to use the Document object without synchronization.
Strongly suggest synchronizing on the owning Resource
object. This method will likely be deprecated in the future.
Please use getResourceObject(String)
instead.
filePath | Location of the corresponding Resource |
---|
Obtains the string contents of the cached object
held by the ResourceCache
mapping table
filePath | Location of the corresponding Resource |
---|---|
encode | the encoding used to open the file resource object |
localeID | for the file. Notice this parameter is actually not used anymore. |
Obtains the string contents of the cached object
held by the ResourceCache
mapping table
filePath | Location of the corresponding Resource |
---|
This method is deprecated.
FileLoader usage is now recommended as a singleton. The FileLoader should
now always be accessed by: FileLoader.getInstance();
Initializes the ResourceCache
object with the FileLoader to use.
This method has been deprecated. The FileLoader is now moved to a singleton pattern,
therefore now it might be accessed by: FileLoader.getInstance();
, so
this method should not be called explicitly, as the FileLoader
provided
might not be the one actually used.
fileLoader | a {link FileLoader} intance |
---|
This method is deprecated.
Should not be called explicitly. To cache objects, callers should implement their own Cache
Stores in the cache table the object provided. This method should not be called explicitly anymore. It is recommended that classes that want to cache their own elements, should create their own Cache by extending the CacheBase or any of its subclasses.
key | The unique identifier of the object in the cache table |
---|---|
resourceObject | the object to store |
This method is deprecated.
Should not be called explicitly. To cache objects, callers should implement their own Cache
Stores in the cache table the object provided. This method should not be called explicitly anymore. It is recommended that classes that want to cache their own elements, should create their own Cache by extending the CacheBase or any of its subclasses.
key | The unique identifier of the object in the cache table |
---|---|
encode | The unique identifier of the object in the cache table |
localeID | The unique identifier of the object in the cache table |
resourceObject | the object to store |
This method is deprecated.
Should not be called explicitly. To cache objects, callers should implement their own Cache
Stores in the cache table the object provided. This method should not be called explicitly anymore. It is recommended that classes that want to cache their own elements, should create their own Cache by extending the CacheBase or any of its subclasses.
key | The unique identifier of the object in the cache table |
---|---|
resourceObject | the object to store |