info.magnolia.module.cache.filter
Class InMemoryCachedEntry

java.lang.Object
  extended by info.magnolia.module.cache.filter.ContentCachedEntry
      extended by info.magnolia.module.cache.filter.InMemoryCachedEntry
All Implemented Interfaces:
CachedEntry, Serializable

public class InMemoryCachedEntry
extends ContentCachedEntry

Cache entry keeping the content in memory. Stores a gzipped and non-gzipped version.

Version:
$Id$
Author:
pbaerfuss
See Also:
Serialized Form

Constructor Summary
InMemoryCachedEntry(byte[] out, String contentType, String characterEncoding, int statusCode, org.apache.commons.collections.MultiMap headers, long modificationDate)
           
 
Method Summary
protected  boolean canServeGzipContent()
           
 byte[] getGzippedContent()
           
 byte[] getPlainContent()
           
protected  void writeContent(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain chain, boolean acceptsGzipEncoding)
           
 
Methods inherited from class info.magnolia.module.cache.filter.ContentCachedEntry
addHeaders, getCharacterEncoding, getContentType, getHeaders, getLastModificationTime, getStatusCode, isAcceptsGzip, replay, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InMemoryCachedEntry

public InMemoryCachedEntry(byte[] out,
                           String contentType,
                           String characterEncoding,
                           int statusCode,
                           org.apache.commons.collections.MultiMap headers,
                           long modificationDate)
                    throws IOException
Throws:
IOException
Method Detail

canServeGzipContent

protected boolean canServeGzipContent()
Specified by:
canServeGzipContent in class ContentCachedEntry

writeContent

protected void writeContent(javax.servlet.http.HttpServletRequest request,
                            javax.servlet.http.HttpServletResponse response,
                            javax.servlet.FilterChain chain,
                            boolean acceptsGzipEncoding)
                     throws IOException
Specified by:
writeContent in class ContentCachedEntry
Throws:
IOException

getPlainContent

public byte[] getPlainContent()

getGzippedContent

public byte[] getGzippedContent()


Copyright © 2003-2011 Magnolia International Ltd.. All Rights Reserved.