|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.fusesource.restygwt.client.cache.DefaultQueueableCacheStorage
public class DefaultQueueableCacheStorage
this implementation stores Response objects until they are removed or purged. when retrieved from the cache the Response will have an extra header field "X-Resty-Cache". this allows CallbackFilter to determine the action on whether the Response came from the cache or just came over the wire.
| Field Summary | |
|---|---|
protected Map<String,HashMap<CacheKey,Response>> |
cache
key <> value hashmap for holding cache values. |
| Fields inherited from interface org.fusesource.restygwt.client.cache.QueueableCacheStorage |
|---|
RESTY_CACHE_HEADER |
| Constructor Summary | |
|---|---|
DefaultQueueableCacheStorage()
|
|
| Method Summary | |
|---|---|
void |
addCallback(CacheKey k,
RequestCallback rc)
|
Response |
getResultOrReturnNull(CacheKey key)
|
Response |
getResultOrReturnNull(CacheKey key,
String scope)
|
boolean |
hasCallback(CacheKey k)
|
void |
purge()
purge the complete cache |
void |
purge(String scope)
purge a particular ident, e.g. |
void |
putResult(CacheKey key,
Response response)
default put method |
void |
putResult(CacheKey key,
Response response,
String... scopes)
put by ident/scope. |
protected void |
putResult(CacheKey key,
Response response,
String scope)
|
void |
remove(CacheKey key)
default delete method |
void |
remove(CacheKey key,
String... scopes)
delete by ident/scope. |
List<RequestCallback> |
removeCallbacks(CacheKey k)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final Map<String,HashMap<CacheKey,Response>> cache
| Constructor Detail |
|---|
public DefaultQueueableCacheStorage()
| Method Detail |
|---|
public Response getResultOrReturnNull(CacheKey key)
getResultOrReturnNull in interface CacheStorage<Response>
public Response getResultOrReturnNull(CacheKey key,
String scope)
getResultOrReturnNull in interface CacheStorage<Response>
public void putResult(CacheKey key,
Response response)
CacheStorage
putResult in interface CacheStorage<Response>
protected void putResult(CacheKey key,
Response response,
String scope)
public void putResult(CacheKey key,
Response response,
String... scopes)
CacheStorage
putResult in interface CacheStorage<Response>public boolean hasCallback(CacheKey k)
hasCallback in interface QueueableCacheStorage
public void addCallback(CacheKey k,
RequestCallback rc)
addCallback in interface QueueableCacheStoragepublic List<RequestCallback> removeCallbacks(CacheKey k)
removeCallbacks in interface QueueableCacheStoragepublic void purge()
CacheStorage
purge in interface CacheStorage<Response>public void purge(String scope)
CacheStorage
purge in interface CacheStorage<Response>public void remove(CacheKey key)
CacheStorage
remove in interface CacheStorage<Response>
public void remove(CacheKey key,
String... scopes)
CacheStorage
remove in interface CacheStorage<Response>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||