T
- The type of the cache valuespublic class StubDataCache<T extends Serializable> extends Object implements DataCache<T>
Constructor and Description |
---|
StubDataCache() |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Removes all of the mappings from this cache.
|
T |
get(String key)
Read data from cache.
|
boolean |
set(String key,
T value)
Put a value on a key in a data cache.
|
public T get(String key)
DataCache
get
in interface DataCache<T extends Serializable>
key
- the key whose associated value is to be returnednull
if this map contains no mapping for the
keypublic boolean set(String key, T value)
DataCache
set
in interface DataCache<T extends Serializable>
key
- the key under which this object should be added.value
- the object to storepublic void clear()
DataCache
clear
in interface DataCache<T extends Serializable>
Copyright © 2016–2018 Yahoo! Inc.. All rights reserved.