|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.makumba.analyser.PageCache
public class PageCache
Cache for the page analysis. It is passed along during analysis and holds useful caches. This class provides two methods to add/retrieve caches throughout the analysis process.
Constructor Summary | |
---|---|
PageCache()
|
Method Summary | |
---|---|
void |
cache(String cacheName,
Object key,
Object value)
Caches an object in a specific cache |
void |
cacheMultiple(String cacheName,
Object key,
Object value)
Caches an object in a cache capable of handling multiple unique values for one key |
void |
cacheNeededResources(Object[] value)
|
void |
cacheSetValues(String cacheName,
Object[] value)
Caches several objects in a specific cache, using sets, i.e. not keeping duplicate values. |
Object |
retrieve(String cacheName,
Object key)
Retrieves an object of a specific cache |
Map<Object,Object> |
retrieveCache(String cacheName)
Gets a whole cache of simple values (does not apply for multi-value caches) |
org.apache.commons.collections.map.MultiValueMap |
retrieveMultiCache(String cacheName)
Gets a whole multivalue cache |
Collection<Object> |
retrieveMultiple(String cacheName,
Object key)
Retrieves the values of a multivalue cache |
org.apache.commons.collections.set.ListOrderedSet |
retrieveSetValues(String cacheName)
Retrieves a set from a specific set cache. |
String |
toString()
|
String |
toString(String key)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PageCache()
Method Detail |
---|
public void cache(String cacheName, Object key, Object value)
cacheName
- the name of the cache we want to work withkey
- the key of the object in this cachevalue
- the value of the object to be cachedpublic Object retrieve(String cacheName, Object key)
cacheName
- the name of the cache we want to work withkey
- the key of the object in this cache
null
if no entry existspublic Map<Object,Object> retrieveCache(String cacheName)
cacheName
- the name of the cache
public void cacheMultiple(String cacheName, Object key, Object value)
cacheName
- the name of the cachekey
- the key of the object to cachevalue
- the value of the object to cache, can be a single value or a collectionpublic Collection<Object> retrieveMultiple(String cacheName, Object key)
cacheName
- the name of the cachekey
- the key of the object to retrieve
Collection
of valuespublic org.apache.commons.collections.map.MultiValueMap retrieveMultiCache(String cacheName)
cacheName
- the name of the cache
MultiValueMap
with the content of the cachepublic void cacheSetValues(String cacheName, Object[] value)
public void cacheNeededResources(Object[] value)
public org.apache.commons.collections.set.ListOrderedSet retrieveSetValues(String cacheName)
public String toString()
toString
in class Object
public String toString(String key)
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |