public class DefaultCacheItem extends Object implements CacheItem
| Modifier and Type | Field and Description |
|---|---|
protected org.joda.time.DateTime |
cachedTime |
protected HTTPResponse |
response |
protected int |
ttl |
| Constructor and Description |
|---|
DefaultCacheItem(HTTPResponse response) |
DefaultCacheItem(HTTPResponse response,
org.joda.time.DateTime cachedTime) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
int |
getAge(HTTPRequest request) |
org.joda.time.DateTime |
getCachedTime() |
HTTPResponse |
getResponse() |
int |
getTTL() |
static int |
getTTL(HTTPResponse response,
int defaultTTLinSeconds) |
int |
hashCode() |
boolean |
isStale(HTTPRequest request) |
protected org.joda.time.DateTime cachedTime
protected HTTPResponse response
protected int ttl
public DefaultCacheItem(HTTPResponse response)
public DefaultCacheItem(HTTPResponse response, org.joda.time.DateTime cachedTime)
public boolean isStale(HTTPRequest request)
public int getAge(HTTPRequest request)
public static int getTTL(HTTPResponse response, int defaultTTLinSeconds)
public org.joda.time.DateTime getCachedTime()
getCachedTime in interface CacheItempublic HTTPResponse getResponse()
getResponse in interface CacheItemCopyright © 2008-2013. All Rights Reserved.