- All Implemented Interfaces:
Cache
public class NoCache
extends Object
implements Cache
-
Constructor Summary
Constructors
Constructor |
Description |
NoCache() |
|
-
Method Summary
Modifier and Type |
Method |
Description |
boolean |
clear() |
Clears all entries in the cache.
|
Object |
get(String key) |
Gets an arbitrary object stored in cache.
|
boolean |
set(String key,
Object val) |
Sets a key/value pair in the cache.
|
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Details
-
get
Description copied from interface: Cache
Gets an arbitrary object stored in cache.
- Specified by:
get
in interface Cache
- Parameters:
key
- the key that maps to the object.
- Returns:
- the value mapped to from `key`.
-
set
Description copied from interface: Cache
Sets a key/value pair in the cache.
- Specified by:
set
in interface Cache
- Parameters:
key
- the key.
val
- the value.
- Returns:
- if caching was successful.
-
clear
public boolean clear()
Description copied from interface: Cache
Clears all entries in the cache.
- Specified by:
clear
in interface Cache
- Returns:
- if clear was successful.