|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.bval.MetaBeanCache
public class MetaBeanCache
Description: a cache to hold metabeans by id and by class.
Field Summary | |
---|---|
protected ConcurrentMap<Class<?>,MetaBean> |
cacheByClass
Cache keyed by class. |
protected ConcurrentMap<String,MetaBean> |
cacheById
Cache keyed by id. |
Constructor Summary | |
---|---|
MetaBeanCache()
Create a new MetaBeanCache instance. |
|
MetaBeanCache(Map<String,MetaBean> beans)
Create a new MetaBeanCache instance. |
Method Summary | |
---|---|
void |
cache(MetaBean beanInfo)
Cache the specified MetaBean. |
void |
clear()
Clear the cache. |
Map<String,MetaBean> |
findAll()
Return all cached MetaBeans by id. |
MetaBean |
findForClass(Class<?> clazz)
Find the MetaBean for the specified class. |
MetaBean |
findForId(String beanInfoId)
Find a MetaBean with a certain id. |
void |
removeFromCache(MetaBean beanInfo)
Remove a single MetaBean from the cache. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final ConcurrentMap<String,MetaBean> cacheById
protected final ConcurrentMap<Class<?>,MetaBean> cacheByClass
Constructor Detail |
---|
public MetaBeanCache()
public MetaBeanCache(Map<String,MetaBean> beans)
beans
- Method Detail |
---|
public void clear()
public MetaBean findForId(String beanInfoId)
findForId
in interface MetaBeanFinder
beanInfoId
- - symbolic unique name of Meta Info
public MetaBean findForClass(Class<?> clazz)
findForClass
in interface MetaBeanFinder
clazz
- - bean class
public Map<String,MetaBean> findAll()
public void cache(MetaBean beanInfo)
beanInfo
- public void removeFromCache(MetaBean beanInfo)
beanInfo
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |