org.apache.abdera.protocol.client.cache
Class CacheBase
java.lang.Object
org.apache.abdera.protocol.client.cache.CacheBase
- All Implemented Interfaces:
- Cache
- Direct Known Subclasses:
- InMemoryCache
public abstract class CacheBase
- extends java.lang.Object
- implements Cache
Method Summary |
protected abstract void |
add(CacheKey key,
CachedResponse response)
|
protected abstract CachedResponse |
createCachedResponse(ClientResponse response,
CacheKey key)
|
CachedResponse |
get(java.lang.String uri,
RequestOptions options)
|
protected abstract CacheKey |
getCacheKey(java.lang.String uri,
RequestOptions options,
ClientResponse response)
|
CacheDisposition |
getDisposition(java.lang.String uri,
RequestOptions options)
|
CachedResponse |
getIfFreshEnough(java.lang.String uri,
RequestOptions options)
|
void |
remove(java.lang.String uri,
RequestOptions options)
|
ClientResponse |
update(RequestOptions options,
ClientResponse response,
ClientResponse cached_response)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
abdera
protected final Abdera abdera
CacheBase
protected CacheBase(Abdera abdera)
get
public CachedResponse get(java.lang.String uri,
RequestOptions options)
- Specified by:
get
in interface Cache
getDisposition
public CacheDisposition getDisposition(java.lang.String uri,
RequestOptions options)
- Specified by:
getDisposition
in interface Cache
remove
public void remove(java.lang.String uri,
RequestOptions options)
- Specified by:
remove
in interface Cache
add
protected abstract void add(CacheKey key,
CachedResponse response)
createCachedResponse
protected abstract CachedResponse createCachedResponse(ClientResponse response,
CacheKey key)
throws java.io.IOException
- Throws:
java.io.IOException
getCacheKey
protected abstract CacheKey getCacheKey(java.lang.String uri,
RequestOptions options,
ClientResponse response)
getIfFreshEnough
public CachedResponse getIfFreshEnough(java.lang.String uri,
RequestOptions options)
- Specified by:
getIfFreshEnough
in interface Cache
update
public ClientResponse update(RequestOptions options,
ClientResponse response,
ClientResponse cached_response)
- Specified by:
update
in interface Cache