T - Class of object to be stored in cacheU - Class of object's idpublic interface StravaCache<T extends StravaCacheable<U>,U>
The caching mechanism caches data temporarily in memory
Data is cached per unique token and cannot be read by a session with an access token different to the one that stored data
| Modifier and Type | Method and Description |
|---|---|
T |
get(U key)
Retrieves the object from the cache.
|
List<T> |
list()
Returns a list of the objects in the cache
|
void |
put(T object)
Stores the given object in the cache
|
void |
putAll(List<T> list)
Puts all the contents of the list in the cache
|
void |
remove(U key)
Removes the object identified by the key from the cache
|
void |
removeAll()
Removes all elements from the cache that are associated with the token
|
int |
size()
Returns the number of objects in the cache
|
T get(U key)
Retrieves the object from the cache.
key - The keynull if not in cacheList<T> list()
Returns a list of the objects in the cache
void put(T object)
Stores the given object in the cache
object - Objectvoid putAll(List<T> list)
Puts all the contents of the list in the cache
list - List of objects to be stored in cachevoid remove(U key)
Removes the object identified by the key from the cache
key - The key of the object to be removedvoid removeAll()
Removes all elements from the cache that are associated with the token
int size()
Returns the number of objects in the cache
Copyright © 2016 Dan Shannon. All rights reserved.