Class LocalDataSourceServiceImpl
- java.lang.Object
-
- com.alibaba.nacos.config.server.service.LocalDataSourceServiceImpl
-
- All Implemented Interfaces:
DataSourceService
@Service("localDataSourceService") public class LocalDataSourceServiceImpl extends Object implements DataSourceServicelocal data source- Author:
- Nacos
-
-
Constructor Summary
Constructors Constructor Description LocalDataSourceServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancheckMasterWritable()check master dbStringgetCurrentDBUrl()get current db urlStringgetHealth()get heathorg.springframework.jdbc.core.JdbcTemplategetJdbcTemplate()get jdbc templateorg.springframework.transaction.support.TransactionTemplategetTransactionTemplate()get transaction templatevoidinit()voidreload()reload
-
-
-
Method Detail
-
init
@PostConstruct public void init()
-
reload
public void reload()
Description copied from interface:DataSourceServicereload- Specified by:
reloadin interfaceDataSourceService
-
checkMasterWritable
public boolean checkMasterWritable()
Description copied from interface:DataSourceServicecheck master db- Specified by:
checkMasterWritablein interfaceDataSourceService- Returns:
- is master
-
getJdbcTemplate
public org.springframework.jdbc.core.JdbcTemplate getJdbcTemplate()
Description copied from interface:DataSourceServiceget jdbc template- Specified by:
getJdbcTemplatein interfaceDataSourceService- Returns:
- JdbcTemplate
-
getTransactionTemplate
public org.springframework.transaction.support.TransactionTemplate getTransactionTemplate()
Description copied from interface:DataSourceServiceget transaction template- Specified by:
getTransactionTemplatein interfaceDataSourceService- Returns:
- TransactionTemplate
-
getCurrentDBUrl
public String getCurrentDBUrl()
Description copied from interface:DataSourceServiceget current db url- Specified by:
getCurrentDBUrlin interfaceDataSourceService- Returns:
-
getHealth
public String getHealth()
Description copied from interface:DataSourceServiceget heath- Specified by:
getHealthin interfaceDataSourceService- Returns:
- heath info
-
-