|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface for retrieving objects to be stored in a Cache
.
This interface may be implemented in order to retrieve templates from
a different data store, such as a relational database.
Method Summary | |
boolean |
connectionOk()
Corresponds to checkCacheDir for file-system implementations. |
boolean |
exists(java.lang.String location)
Tests whether the object still exists in the template repository. |
java.lang.String |
getConnection()
Gets the connection for this retriever. |
java.util.List |
getPreloadData()
Returns a list of objects ( String s) to pre-load the cache with. |
long |
lastModified(java.lang.String location)
Determines when the object in the template repository was last modified. |
Cacheable |
loadData(java.lang.String location,
java.lang.String type)
Retrieves data of the appropriate type to be stored in the cache. |
void |
setConnection(java.lang.String connection)
Sets the connection for this retriever. |
Method Detail |
public Cacheable loadData(java.lang.String location, java.lang.String type) throws TemplateException
location
- the location of the data to be retrievedtype
- the type of object to be returnedCacheable
object loaded from the data sourceTemplateException
- the object could not be loadedpublic boolean exists(java.lang.String location)
location
- the location of the object to be testedtrue
if the object still exists in the repository,
otherwise false
lastModified(java.lang.String)
public long lastModified(java.lang.String location) throws TemplateException
Determines when the object in the template repository was last modified.
location
- the location of the object to be testedTemplateException
- is thrown whenever the item:
public java.util.List getPreloadData() throws TemplateException
String
s) to pre-load the cache with.List
of String
s to preload the
cache withpublic boolean connectionOk() throws TemplateException
true
if the connection is ok, otherwise false
TemplateException
- whenever the connection has failed, and cannot
be re-establishedpublic void setConnection(java.lang.String connection)
connection
- the connection string for this retrieverpublic java.lang.String getConnection()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |