Package tigase.db.beans
Class MDPoolBean<S,T extends MDPoolConfigBean<S,T>>
java.lang.Object
tigase.db.beans.MDPoolBean<S,T>
- All Implemented Interfaces:
RegistrarBean,RegistrarBeanWithDefaultBeanClass
- Direct Known Subclasses:
DataSourceBean,MDPoolBeanWithStatistics
public abstract class MDPoolBean<S,T extends MDPoolConfigBean<S,T>>
extends Object
implements RegistrarBeanWithDefaultBeanClass
Abstract class providing base part for implementation of pool for multiple domains.
Created by andrzej on 08.03.2016.
Created by andrzej on 08.03.2016.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidMethod called to add repo instance for domainReturns per domain configuration classDefault alias used if for provided domain then is no repo instance.getName()voidMethod called when bean is being registered allowing developer to programatically register other beans.protected voidregisterConfigBean(String domain) protected abstract SremoveRepo(String domain) Method called to remove repo instance for domainprotected abstract voidsetDefault(S repo) Method called to set default repo instance.voidunregister(Kernel kernel) Method called while bean is being unregistered.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface tigase.kernel.beans.RegistrarBeanWithDefaultBeanClass
getDefaultBeanClass
-
Field Details
-
REPO_URI
- See Also:
-
REPO_CLASS
- See Also:
-
POOL_CLASS
- See Also:
-
POOL_SIZE
- See Also:
-
-
Constructor Details
-
MDPoolBean
public MDPoolBean()
-
-
Method Details
-
getName
-
register
Description copied from interface:RegistrarBeanMethod called when bean is being registered allowing developer to programatically register other beans.- Specified by:
registerin interfaceRegistrarBean- Parameters:
kernel- - instance from local scope
-
unregister
Description copied from interface:RegistrarBeanMethod called while bean is being unregistered.- Specified by:
unregisterin interfaceRegistrarBean- Parameters:
kernel- - instance from local scope
-
getDefaultAlias
Default alias used if for provided domain then is no repo instance.- Returns:
- default alias
-
registerConfigBean
-
getConfigClass
Returns per domain configuration class- Returns:
- class
-
addRepo
Method called to add repo instance for domain -
removeRepo
Method called to remove repo instance for domain- Returns:
- removed instance of repo
-
setDefault
Method called to set default repo instance.- Parameters:
repo- instance of repo
-