|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.portal.generic.Cache
public abstract class Cache
| Field Summary | |
|---|---|
protected static java.util.logging.Logger |
log
|
| Constructor Summary | |
|---|---|
Cache()
|
|
| Method Summary | |
|---|---|
abstract void |
finishCaching(java.io.OutputStream outputStream,
int expirationCache,
CacheKey cacheKey,
java.util.Map<java.lang.String,java.lang.Object> cachePropertiesMap,
java.util.Map<java.lang.String,java.lang.Object> propertiesMap,
java.util.Map<java.lang.String,java.lang.String> requestAttributeMap)
Finish with an OutputStream previously returned by #startCachingOutputStream. |
abstract void |
finishCaching(java.io.Writer writer,
int expirationCache,
CacheKey cacheKey,
java.lang.String encoding,
java.util.Map<java.lang.String,java.lang.Object> cachePropertiesMap,
java.util.Map<java.lang.String,java.lang.Object> propertiesMap,
java.util.Map<java.lang.String,java.lang.String> requestAttributeMap)
Finish with a Writer previously returned by #startCachingWriter. |
abstract java.io.OutputStream |
getCachingOutputStream(java.lang.String namespace,
int expirationCache,
boolean isPrivate)
Called immediately before a Portlet is rendered to give the Cache an opportunity to cache the response. |
abstract java.io.Writer |
getCachingWriter(java.lang.String namespace,
int expirationCache,
boolean isPrivate)
Called to give the Cache an opportunity to cache the response. |
abstract int |
respondFromCache(CacheKey cacheKey,
RenderRequest request,
RenderResponse response)
Send a response from the cache, or return false if there is no response from the cache. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final java.util.logging.Logger log
| Constructor Detail |
|---|
public Cache()
| Method Detail |
|---|
public abstract int respondFromCache(CacheKey cacheKey,
RenderRequest request,
RenderResponse response)
public abstract java.io.Writer getCachingWriter(java.lang.String namespace,
int expirationCache,
boolean isPrivate)
throws java.io.IOException
window - the portlet configuration for the portlet about to
be renderednamespace - the namespace for the portlet about to be renderedexpirationCache - a best guess at the expiration period in seconds,
-1 if unlimited
java.io.IOException
public abstract java.io.OutputStream getCachingOutputStream(java.lang.String namespace,
int expirationCache,
boolean isPrivate)
throws java.io.IOException
window - the portlet window for the portlet about to
be renderednamespace - the namespace for the portlet about to be renderedexpirationCache - a best guess at the expiration period in seconds,
-1 if unlimited
java.io.IOException
public abstract void finishCaching(java.io.Writer writer,
int expirationCache,
CacheKey cacheKey,
java.lang.String encoding,
java.util.Map<java.lang.String,java.lang.Object> cachePropertiesMap,
java.util.Map<java.lang.String,java.lang.Object> propertiesMap,
java.util.Map<java.lang.String,java.lang.String> requestAttributeMap)
#startCachingWriter. If the expirationCache is 0 or the cacheKey is
null, the cached response must be discarded.
writer - the writer returned from #startCachingWriterexpirationCache - the updated expirationCache, this may the same
value received in #startWriter, a new value set by
the portlet while it rendered itself, or 0 if the cache must be
discarded.cacheKey - the CacheKey that uniquely differentiates this
response from other responsesencoding - the encoding for the Writer, the cache needs to call
response.setEncoding(encoding) if it later responds in respondFromCache().cachePropertiesMap - a map of properties that begin with "Cache-",
these may be directives to the cache or may be keys and values that should
distinguish the uniqueness of the Cached value beyond the uniqueness
established by CacheKey, depending on the portal implementation.
These properties should be recreated during respondFromCache().
If the value is a String, setProperty is used. If the value is
an ArrayListpropertiesMap - a map of properties that the Cache must recreate
when the cached response is used in a susbsequent call to respondFromCache
If the value is a String, setProperty is used. If the value is
an ArrayListrequestAttributesMap - a map of request attributes that the Cache
must recreate when the cached response is used in a susbsequent call to
respondFromCache
public abstract void finishCaching(java.io.OutputStream outputStream,
int expirationCache,
CacheKey cacheKey,
java.util.Map<java.lang.String,java.lang.Object> cachePropertiesMap,
java.util.Map<java.lang.String,java.lang.Object> propertiesMap,
java.util.Map<java.lang.String,java.lang.String> requestAttributeMap)
#startCachingOutputStream. If the cacheKey is null or
the expirationCache is 0, the cached response must be discarded.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||