public class MemoryCache extends java.lang.Object implements SimpleCache
HashMap.
Note: This cache is not transaction- or thread-safe. Use it for single-threaded tests only.
| Constructor and Description |
|---|
MemoryCache() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
boolean |
contains(java.io.Serializable key) |
java.lang.Object |
get(java.io.Serializable key) |
java.util.Collection |
getKeys() |
void |
put(java.io.Serializable key,
java.lang.Object value) |
void |
remove(java.io.Serializable key)
Removes the cache entry whether or not the value stored against it is null.
|
public boolean contains(java.io.Serializable key)
contains in interface SimpleCachekey - the cache key to check up onpublic java.util.Collection getKeys()
getKeys in interface SimpleCachepublic java.lang.Object get(java.io.Serializable key)
get in interface SimpleCachepublic void put(java.io.Serializable key,
java.lang.Object value)
put in interface SimpleCachekey - the key against which to store the valuevalue - the value to store. null is allowed.public void remove(java.io.Serializable key)
SimpleCacheremove in interface SimpleCachekey - the key value to removepublic void clear()
clear in interface SimpleCacheCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.