public abstract class AsyncCache
extends java.lang.Object
Cache interface.
WARNING: This API is experimental and subject to breaking changes. Please see https://github.com/google/volley/wiki/Asynchronous-Volley for more details.
| Modifier and Type | Class and Description |
|---|---|
static interface |
AsyncCache.OnGetCompleteCallback |
static interface |
AsyncCache.OnWriteCompleteCallback |
| Constructor and Description |
|---|
AsyncCache() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
clear(AsyncCache.OnWriteCompleteCallback callback)
Clears the cache.
|
abstract void |
get(java.lang.String key,
AsyncCache.OnGetCompleteCallback callback)
Retrieves an entry from the cache and sends it back through the
AsyncCache.OnGetCompleteCallback.onGetComplete(com.android.volley.Cache.Entry) function |
abstract void |
initialize(AsyncCache.OnWriteCompleteCallback callback)
Initializes the cache and calls
AsyncCache.OnWriteCompleteCallback.onWriteComplete() after the
operation is finished. |
abstract void |
invalidate(java.lang.String key,
boolean fullExpire,
AsyncCache.OnWriteCompleteCallback callback)
Invalidates an entry in the cache and calls
AsyncCache.OnWriteCompleteCallback.onWriteComplete()
after the operation is finished. |
abstract void |
put(java.lang.String key,
Cache.Entry entry,
AsyncCache.OnWriteCompleteCallback callback)
Writes a
Cache.Entry to the cache, and calls AsyncCache.OnWriteCompleteCallback.onWriteComplete() after the operation is finished. |
abstract void |
remove(java.lang.String key,
AsyncCache.OnWriteCompleteCallback callback)
Removes a
Cache.Entry from the cache, and calls AsyncCache.OnWriteCompleteCallback.onWriteComplete() after the operation is finished. |
public abstract void get(java.lang.String key,
AsyncCache.OnGetCompleteCallback callback)
AsyncCache.OnGetCompleteCallback.onGetComplete(com.android.volley.Cache.Entry) functionkey - Cache keycallback - Callback that will be notified when the information has been retrievedpublic abstract void put(java.lang.String key,
Cache.Entry entry,
AsyncCache.OnWriteCompleteCallback callback)
Cache.Entry to the cache, and calls AsyncCache.OnWriteCompleteCallback.onWriteComplete() after the operation is finished.key - Cache keyentry - The entry to be written to the cachecallback - Callback that will be notified when the information has been writtenpublic abstract void clear(AsyncCache.OnWriteCompleteCallback callback)
AsyncCache.OnWriteCompleteCallback.onWriteComplete() after the operation is finished.public abstract void initialize(AsyncCache.OnWriteCompleteCallback callback)
AsyncCache.OnWriteCompleteCallback.onWriteComplete() after the
operation is finished.public abstract void invalidate(java.lang.String key,
boolean fullExpire,
AsyncCache.OnWriteCompleteCallback callback)
AsyncCache.OnWriteCompleteCallback.onWriteComplete()
after the operation is finished.key - Cache keyfullExpire - True to fully expire the entry, false to soft expirecallback - Callback that's invoked once the entry has been invalidatedpublic abstract void remove(java.lang.String key,
AsyncCache.OnWriteCompleteCallback callback)
Cache.Entry from the cache, and calls AsyncCache.OnWriteCompleteCallback.onWriteComplete() after the operation is finished.key - Cache keycallback - Callback that's invoked once the entry has been removed