Class BeanDescriptionCache
- java.lang.Object
-
- ch.qos.logback.core.spi.ContextAwareBase
-
- ch.qos.logback.core.joran.util.beans.BeanDescriptionCache
-
- All Implemented Interfaces:
ContextAware
public class BeanDescriptionCache extends ContextAwareBase
Cache forBeanDescription
instances. All the cache users which use the same instance of BeanDescriptionCache can profit from each others cached bean descriptions.The cache is not thread-safe and should not be shared across configurator instances.
-
-
Field Summary
Fields Modifier and Type Field Description private BeanDescriptionFactory
beanDescriptionFactory
private java.util.Map<java.lang.Class<?>,BeanDescription>
classToBeanDescription
-
Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context
-
-
Constructor Summary
Constructors Constructor Description BeanDescriptionCache(Context context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BeanDescription
getBeanDescription(java.lang.Class<?> clazz)
Returned bean descriptions are hold in a cache.private BeanDescriptionFactory
getBeanDescriptionFactory()
-
Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext
-
-
-
-
Field Detail
-
classToBeanDescription
private java.util.Map<java.lang.Class<?>,BeanDescription> classToBeanDescription
-
beanDescriptionFactory
private BeanDescriptionFactory beanDescriptionFactory
-
-
Constructor Detail
-
BeanDescriptionCache
public BeanDescriptionCache(Context context)
-
-
Method Detail
-
getBeanDescriptionFactory
private BeanDescriptionFactory getBeanDescriptionFactory()
-
getBeanDescription
public BeanDescription getBeanDescription(java.lang.Class<?> clazz)
Returned bean descriptions are hold in a cache. If the cache does not contain a description for a given class, a new bean description is created and put in the cache, before it is returned.- Parameters:
clazz
- to get a bean description for.- Returns:
- a bean description for the given class.
-
-