|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecthelma.util.CacheMap
public class CacheMap
| Constructor Summary | |
|---|---|
CacheMap()
Zero argument constructor. |
|
CacheMap(int initialCapacity)
|
|
CacheMap(int initialCapacity,
float loadFactor)
|
|
| Method Summary | |
|---|---|
boolean |
clear()
Removes all items currently stored in the cache. |
boolean |
containsKey(java.lang.Object key)
Returns true if the collection contains an element for the key. |
int |
containsKeys(java.lang.Object[] keys)
Returns the number of keys in object array keys that
were not found in the Map. |
boolean |
containsValue(java.lang.Object value)
|
protected java.util.Map |
createTable(int capacity,
float loadFactor)
Override this method to use custom Map implementations. |
java.lang.Object |
get(java.lang.Object key)
Gets the object associated with the specified key in the hashtable. |
java.lang.Object[] |
getCachedObjects()
Return an array with all objects currently contained in the cache. |
void |
init(Application app)
Set the Application instance
for the cache. |
boolean |
isEmpty()
|
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
Puts the specified element into the hashtable, using the specified key. |
java.lang.Object |
remove(java.lang.Object key)
Removes the element corresponding to the key. |
void |
setCapacity(int capacity)
|
void |
shutdown()
Called when the application holding the cache is stopped. |
int |
size()
Return the number of objects currently stored in the cache. |
java.lang.String |
toString()
|
void |
updateProperties(java.util.Properties props)
Called when the application's properties have been updated to let the cache implementation update its settings. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public CacheMap()
public CacheMap(int initialCapacity,
float loadFactor)
public CacheMap(int initialCapacity)
| Method Detail |
|---|
public int size()
ObjectCache
size in interface ObjectCachepublic boolean isEmpty()
public void setCapacity(int capacity)
public boolean containsValue(java.lang.Object value)
public boolean containsKey(java.lang.Object key)
ObjectCache
containsKey in interface ObjectCachekey - the key that we are looking forpublic int containsKeys(java.lang.Object[] keys)
ObjectCachekeys that
were not found in the Map.
Those keys that are contained in the Map are nulled out in the array.
containsKeys in interface ObjectCachekeys - an array of key objects we are looking forObjectCache.containsKey(java.lang.Object)public java.lang.Object get(java.lang.Object key)
ObjectCache
get in interface ObjectCachekey - the specified key
ObjectCache.put(java.lang.Object, java.lang.Object)
public java.lang.Object put(java.lang.Object key,
java.lang.Object value)
ObjectCache
put in interface ObjectCachekey - the specified key in the hashtablevalue - the specified element
ObjectCache.get(java.lang.Object)public java.lang.Object remove(java.lang.Object key)
ObjectCache
remove in interface ObjectCachekey - the key that needs to be removed
public boolean clear()
ObjectCache
clear in interface ObjectCachepublic void shutdown()
ObjectCache
shutdown in interface ObjectCachepublic void init(Application app)
ObjectCacheApplication instance
for the cache.
init in interface ObjectCacheapp - the app instancepublic void updateProperties(java.util.Properties props)
ObjectCache
updateProperties in interface ObjectCachepublic java.lang.Object[] getCachedObjects()
ObjectCache
getCachedObjects in interface ObjectCachepublic java.lang.String toString()
toString in class java.lang.Object
protected java.util.Map createTable(int capacity,
float loadFactor)
capacity - the initial capacityloadFactor - the load factor
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||