|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.wamblee.cache.ZeroCache<KeyType,ValueType>
public class ZeroCache<KeyType extends java.io.Serializable,ValueType extends java.io.Serializable>
A cache that does not cache. This implementation is useful for disabling caching. Because of this implementation, application code does not need to distinguish between the situation where it a cache is used and where it isn't.
| Constructor Summary | |
|---|---|
ZeroCache()
|
|
| Method Summary | |
|---|---|
void |
clear()
Removes all entries from the cache. |
ValueType |
get(KeyType aKey)
Retrieves a value from the cache. |
void |
put(KeyType aKey,
ValueType aValue)
Adds a key-value pair to the cache. |
void |
remove(KeyType aKey)
Removes an entry from the cache. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ZeroCache()
| Method Detail |
|---|
public void put(KeyType aKey,
ValueType aValue)
Cache
put in interface Cache<KeyType extends java.io.Serializable,ValueType extends java.io.Serializable>aKey - Key.aValue - Value.public ValueType get(KeyType aKey)
Cache
get in interface Cache<KeyType extends java.io.Serializable,ValueType extends java.io.Serializable>aKey - Key to retrieve.
public void remove(KeyType aKey)
Cache
remove in interface Cache<KeyType extends java.io.Serializable,ValueType extends java.io.Serializable>aKey - Key to remove the entry for.public void clear()
Cache
clear in interface Cache<KeyType extends java.io.Serializable,ValueType extends java.io.Serializable>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||