类 NamedDataSourceSelector
java.lang.Object
com.alibaba.druid.pool.ha.selector.NamedDataSourceSelector
- 所有已实现的接口:
DataSourceSelector
Use the given name in ThreadLocal variable to choose DataSource.
- 作者:
- DigitalSonic
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voiddestroy()Destroy the DataSourceSelector, maybe interrupt the Thread.get()Return a DataSource according to the implemention.getName()Return the name of this DataSourceSelector.voidinit()Init the DataSourceSelector before use it.voidvoidsetDefaultName(String defaultName) voidSet the target DataSource name to return.
-
字段详细资料
-
DEFAULT_NAME
- 另请参阅:
-
-
构造器详细资料
-
NamedDataSourceSelector
-
-
方法详细资料
-
init
public void init()从接口复制的说明:DataSourceSelectorInit the DataSourceSelector before use it.- 指定者:
init在接口中DataSourceSelector
-
destroy
public void destroy()从接口复制的说明:DataSourceSelectorDestroy the DataSourceSelector, maybe interrupt the Thread.- 指定者:
destroy在接口中DataSourceSelector
-
getName
从接口复制的说明:DataSourceSelectorReturn the name of this DataSourceSelector. e.g. byName- 指定者:
getName在接口中DataSourceSelector
-
get
从接口复制的说明:DataSourceSelectorReturn a DataSource according to the implemention.- 指定者:
get在接口中DataSourceSelector
-
setTarget
从接口复制的说明:DataSourceSelectorSet the target DataSource name to return. Wether to use this or not, it's decided by the implemention.- 指定者:
setTarget在接口中DataSourceSelector
-
getTarget
-
resetDataSourceName
public void resetDataSourceName() -
getDefaultName
-
setDefaultName
-