| java.lang.Object org.springframework.beans.factory.support.DefaultSingletonBeanRegistry
All known Subclasses: org.springframework.beans.factory.support.AbstractBeanFactory,
Field Summary | |
final protected Log | logger |
logger | final protected Log logger(Code) | | Logger available to subclasses
|
addSingleton | protected void addSingleton(String beanName, Object singletonObject)(Code) | | Add the given singleton object to the singleton cache of this factory.
To be called for eager registration of singletons, e.g. to be able to
resolve circular references.
Parameters: beanName - the name of the bean Parameters: singletonObject - the singleton object |
containsSingleton | public boolean containsSingleton(String beanName)(Code) | | |
destroyBean | protected void destroyBean(String beanName, DisposableBean bean)(Code) | | Destroy the given bean. Must destroy beans that depend on the given
bean before the bean itself. Should not throw any exceptions.
Parameters: beanName - the name of the bean Parameters: bean - the bean instance to destroy |
destroySingleton | public void destroySingleton(String beanName)(Code) | | Destroy the given bean. Delegates to destroyBean
if a corresponding disposable bean instance is found.
Parameters: beanName - the name of the bean See Also: DefaultSingletonBeanRegistry.destroyBean |
destroySingletons | public void destroySingletons()(Code) | | |
getDependentBeans | protected Set getDependentBeans(String beanName)(Code) | | Return whether a dependent bean has been registered under the given name.
Parameters: beanName - the name of the bean an unmodifiable Set of dependent bean names (as Strings) |
getSingleton | public Object getSingleton(String beanName, ObjectFactory singletonFactory)(Code) | | Return the (raw) singleton object registered under the given name,
creating and registering a new one if none registered yet.
Parameters: beanName - the name of the bean Parameters: singletonFactory - the ObjectFactory to lazily create the singletonwith, if necessary the registered singleton object |
getSingletonCount | public int getSingletonCount()(Code) | | |
getSingletonMutex | final protected Object getSingletonMutex()(Code) | | Expose the singleton mutex to subclasses.
Subclasses should synchronize on the given Object if they perform
any sort of extended singleton creation phase. In particular, subclasses
should not have their own mutexes involved in singleton creation,
to avoid the potential for deadlocks in lazy-init situations.
|
hasDependentBean | protected boolean hasDependentBean(String beanName)(Code) | | Return whether a dependent bean has been registered under the given name.
Parameters: beanName - the name of the bean |
isSingletonCurrentlyInCreation | final public boolean isSingletonCurrentlyInCreation(String beanName)(Code) | | Return whether the specified singleton bean is currently in creation
(within the entire factory).
Parameters: beanName - the name of the bean |
registerDependentBean | public void registerDependentBean(String beanName, String dependentBeanName)(Code) | | Register a dependent bean for the given bean,
to be destroyed before the given bean is destroyed.
Parameters: beanName - the name of the bean Parameters: dependentBeanName - the name of the dependent bean |
registerDisposableBean | public void registerDisposableBean(String beanName, DisposableBean bean)(Code) | | Add the given bean to the list of disposable beans in this registry.
Disposable beans usually correspond to registered singletons,
matching the bean name but potentially being a different instance
(for example, a DisposableBean adapter for a singleton that does not
naturally implement Spring's DisposableBean interface).
Parameters: beanName - the name of the bean Parameters: bean - the bean instance |
removeSingleton | protected void removeSingleton(String beanName)(Code) | | Remove the bean with the given name from the singleton cache of this factory.
To be able to clean up eager registration of a singleton if creation failed.
Parameters: beanName - the name of the bean |
|
|