Package com.sun.appserv.web.cache.filter
Class HttpCacheEntry
- java.lang.Object
-
- com.sun.appserv.web.cache.filter.HttpCacheEntry
-
public class HttpCacheEntry extends Object
HttpCacheEntry Each entry holds cached (HTTP) response: a) response bytes b) response headers c) expiryTime d) parameterEncoding used e) entryKey this entry represents, to match the entry within the hash bucket. XXX: should implement methods to enable serialization of cached response?
-
-
Field Summary
Fields Modifier and Type Field Description static int
VALUE_NOT_SET
-
Constructor Summary
Constructors Constructor Description HttpCacheEntry()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
clear the contentsvoid
computeExpireTime(int timeout)
compute when this entry to be expired based on timeout relative to current time.int
getSize()
get the sizeboolean
isValid()
is this response still valid?void
setExpireTime(long expireTime)
set the real expire time
-
-
-
Field Detail
-
VALUE_NOT_SET
public static final int VALUE_NOT_SET
- See Also:
- Constant Field Values
-
-
Method Detail
-
setExpireTime
public void setExpireTime(long expireTime)
set the real expire time- Parameters:
expireTime
- in milli seconds
-
computeExpireTime
public void computeExpireTime(int timeout)
compute when this entry to be expired based on timeout relative to current time.- Parameters:
timeout
- in seconds
-
isValid
public boolean isValid()
is this response still valid?
-
clear
public void clear()
clear the contents
-
getSize
public int getSize()
get the size- Returns:
- size of this entry in bytes Note: this is only approximate
-
-