|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.sswap.api.servlet.ContentCache
public class ContentCache
Caches arbitrary user/service content (e.g., resources referenced in an RRG) The underlying cache implementation is currently provided by EHCache
| Nested Class Summary | |
|---|---|
(package private) static class |
ContentCache.Entry
An entry of the cache. |
| Field Summary | |
|---|---|
private boolean |
active
|
private net.sf.ehcache.CacheManager |
cacheManager
EHCache CacheManager |
private static java.lang.String |
EHCACHE_CONF_FILE
Name of resource that contains EHCache configuration file |
private static ContentCache |
instance
Singleton instance of this class |
| Constructor Summary | |
|---|---|
private |
ContentCache()
Private constructor (to be accessed only when creating the singleton instance) |
| Method Summary | |
|---|---|
static ContentCache |
get()
Accessor for the singleton instance |
ContentCache.Entry |
get(java.lang.String token)
Gets an entry for a (possibly future) RRG. |
private net.sf.ehcache.Cache |
getCache()
Gets the cache used for storing RRGs from EHCache cache manager |
boolean |
isActive()
|
void |
shutdown()
|
void |
store(java.lang.String token,
byte[] content,
java.lang.String contentType)
Stores a computed RRG, indicating that the computation of an RRG was successful, and allowing its future retrieval by the client. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final java.lang.String EHCACHE_CONF_FILE
private static final ContentCache instance
private net.sf.ehcache.CacheManager cacheManager
private boolean active
| Constructor Detail |
|---|
private ContentCache()
| Method Detail |
|---|
public static ContentCache get()
private net.sf.ehcache.Cache getCache()
public void store(java.lang.String token,
byte[] content,
java.lang.String contentType)
token - the token identifying the RRG that has been computedcontent - the "content" (data) to be storedcontentType - "type" of content, such as a MIME typepublic ContentCache.Entry get(java.lang.String token)
token - the token for which the entry should be obtained
public boolean isActive()
public void shutdown()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||