|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bankframe.services.cache.NullCache
public class NullCache
This class implements Cache & NamedCache and is intended for use when a implementation code refers to a named cache, but at runtime caching is not required. The cache therefore has no memory overhead. Note that this cache always uses NullPolicy.INSTANCE. No other policy can be assigned.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
Map.Entry<K,V> |
| Constructor Summary | |
|---|---|
NullCache()
Constructor for NullCache. |
|
| Method Summary | |
|---|---|
void |
addCacheListener(Object key,
CacheListener listener)
Adds a CacheListener for a specified key. |
void |
cleanup()
This method cleans up the cache by removing un-needed entries |
void |
clear()
|
boolean |
containsKey(Object arg0)
|
boolean |
containsValue(Object arg0)
|
void |
enableCaching(boolean enableCache)
This method enables or disables caching. |
Set |
entrySet()
|
Object |
get(Object arg0)
|
CachePolicy |
getCachePolicy()
This method gets the CachePolicy object for this Cache |
String |
getName()
Returns the name. |
boolean |
isEmpty()
|
Set |
keySet()
|
Object |
put(Object arg0,
Object arg1)
|
void |
putAll(Map arg0)
|
Object |
remove(Object arg0)
|
void |
remove(Set keySet)
This method removes the specified keys from the cache and the data store |
void |
removeAll()
Removes all objects from the cache and from the data store. |
void |
removeCacheListener(Object key,
CacheListener listener)
Removes a CacheListener for a specified key. |
void |
setCachePolicy(CachePolicy policy)
This method sets the CachePolicy object for this Cache |
void |
setName(String name)
Returns the value. |
int |
size()
|
Collection |
values()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.Map |
|---|
equals, hashCode |
| Constructor Detail |
|---|
public NullCache()
| Method Detail |
|---|
public void cleanup()
Cache
cleanup in interface CacheCache.cleanup()public void enableCaching(boolean enableCache)
Cache
enableCaching in interface CacheenableCache - true to enable, false to disableCache.enableCaching(boolean)public CachePolicy getCachePolicy()
Cache
getCachePolicy in interface CacheCache.getCachePolicy()public void remove(Set keySet)
Cache
remove in interface CachekeySet - the keys to remove from the cacheCache.remove(Set)public void removeAll()
Cache
removeAll in interface CacheCache.removeAll()public void setCachePolicy(CachePolicy policy)
Cache
setCachePolicy in interface Cachepolicy - The new cache policyCache.setCachePolicy(CachePolicy)public void setName(String name)
NamedCache
setName in interface NamedCachename - StringNamedCache.setName(String)public String getName()
NamedCache
getName in interface NamedCacheNamedCache.getName()public int size()
size in interface MapMap.size()public boolean isEmpty()
isEmpty in interface MapMap.isEmpty()public boolean containsKey(Object arg0)
containsKey in interface MapMap.containsKey(Object)public boolean containsValue(Object arg0)
containsValue in interface MapMap.containsValue(Object)public Object get(Object arg0)
get in interface MapMap.get(Object)
public Object put(Object arg0,
Object arg1)
put in interface MapMap.put(Object, Object)public Object remove(Object arg0)
remove in interface MapMap.remove(Object)public void putAll(Map arg0)
putAll in interface MapMap.putAll(Map)public void clear()
clear in interface MapMap.clear()public Set keySet()
keySet in interface MapMap.keySet()public Collection values()
values in interface MapMap.values()public Set entrySet()
entrySet in interface MapMap.entrySet()
public void addCacheListener(Object key,
CacheListener listener)
addCacheListener in interface Cache
public void removeCacheListener(Object key,
CacheListener listener)
removeCacheListener in interface Cache
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||