接口 DataSourceService
-
public interface DataSourceServiceDatasource interface.- 作者:
- Nacos
-
-
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 booleancheckMasterWritable()Check master db.java.lang.StringgetCurrentDbUrl()Get current db url.java.lang.StringgetDataSourceType()Get current db type.java.lang.StringgetHealth()Get heath information.org.springframework.jdbc.core.JdbcTemplategetJdbcTemplate()Get jdbc template.org.springframework.transaction.support.TransactionTemplategetTransactionTemplate()Get transaction template.voidinit()Initialize the relevant resource information.voidreload()Reload.
-
-
-
方法详细资料
-
init
void init() throws java.lang.Exception
Initialize the relevant resource information.- 抛出:
java.lang.Exception- exception.
-
reload
void reload() throws java.io.IOExceptionReload.- 抛出:
java.io.IOException- exception.
-
checkMasterWritable
boolean checkMasterWritable()
Check master db.- 返回:
- is master.
-
getJdbcTemplate
org.springframework.jdbc.core.JdbcTemplate getJdbcTemplate()
Get jdbc template.- 返回:
- JdbcTemplate.
-
getTransactionTemplate
org.springframework.transaction.support.TransactionTemplate getTransactionTemplate()
Get transaction template.- 返回:
- TransactionTemplate.
-
getCurrentDbUrl
java.lang.String getCurrentDbUrl()
Get current db url.- 返回:
- database url
-
getHealth
java.lang.String getHealth()
Get heath information.- 返回:
- heath info.
-
getDataSourceType
java.lang.String getDataSourceType()
Get current db type.- 返回:
-
-