Package tigase.db.beans
Class DataSourceBean.DataSourceMDConfigBean
java.lang.Object
tigase.db.beans.MDPoolConfigBean<DataSource,DataSourceBean.DataSourceMDConfigBean>
tigase.db.beans.DataSourceBean.DataSourceMDConfigBean
- All Implemented Interfaces:
ConfigurationChangedAware,Initializable,RegistrarBean,UnregisterAware
- Enclosing class:
DataSourceBean
public static class DataSourceBean.DataSourceMDConfigBean
extends MDPoolConfigBean<DataSource,DataSourceBean.DataSourceMDConfigBean>
implements UnregisterAware
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidMethod called before bean unregister.protected Class<? extends DataSource> Get interface to which all instances in this pool must conform.protected StringFinds and retrieves repository pool class name for data source defined in this config bean.voidMethod will be called, when bean will be created, configured and ready to use.protected voidinitRepository(DataSource repo) Initializes instances of provided data source.voidsetWatchdogFrequency(Duration watchdogFrequency) Methods inherited from class tigase.db.beans.MDPoolConfigBean
beanConfigurationChanged, getRepository, getRepositoryClassName, getUri, register, setInstances, setMdPool, setRepository, unloadOldBeans, unregister
-
Constructor Details
-
DataSourceMDConfigBean
public DataSourceMDConfigBean()
-
-
Method Details
-
setWatchdogFrequency
-
initialize
public void initialize()Description copied from interface:InitializableMethod will be called, when bean will be created, configured and ready to use.- Specified by:
initializein interfaceInitializable- Overrides:
initializein classMDPoolConfigBean<DataSource,DataSourceBean.DataSourceMDConfigBean>
-
beforeUnregister
public void beforeUnregister()Description copied from interface:UnregisterAwareMethod called before bean unregister.- Specified by:
beforeUnregisterin interfaceUnregisterAware
-
getRepositoryIfc
Get interface to which all instances in this pool must conform.- Specified by:
getRepositoryIfcin classMDPoolConfigBean<DataSource,DataSourceBean.DataSourceMDConfigBean> - Returns:
- interface `
-
getRepositoryPoolClassName
Finds and retrieves repository pool class name for data source defined in this config bean. *
Name of a pool class will be retrieved frompoolClsfield or looked for instances ofDataSourcePoolclass annotated withRepository.Metawhich supported uri matches (regexp) of data source URI.- Specified by:
getRepositoryPoolClassNamein classMDPoolConfigBean<DataSource,DataSourceBean.DataSourceMDConfigBean> - Returns:
- name of a class
- Throws:
DBInitException
-
initRepository
Initializes instances of provided data source.- Specified by:
initRepositoryin classMDPoolConfigBean<DataSource,DataSourceBean.DataSourceMDConfigBean> - Parameters:
repo- instance of data source- Throws:
RepositoryException
-