public class LocalDataSourceServiceImpl extends Object implements DataSourceService
| 构造器和说明 |
|---|
LocalDataSourceServiceImpl() |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
checkMasterWritable()
Check master db.
|
void |
cleanAndReopenDerby()
Clean and reopen Derby.
|
String |
getCurrentDbUrl()
Get current db url.
|
DataSource |
getDatasource() |
String |
getHealth()
Get heath information.
|
org.springframework.jdbc.core.JdbcTemplate |
getJdbcTemplate()
Get jdbc template.
|
org.springframework.transaction.support.TransactionTemplate |
getTransactionTemplate()
Get transaction template.
|
void |
init()
Initialize the relevant resource information.
|
void |
reload()
Reload.
|
void |
restoreDerby(String jdbcUrl,
Callable<Void> callable)
Restore derby.
|
void |
setHealthStatus(String healthStatus) |
@PostConstruct public void init() throws Exception
DataSourceServiceinit 在接口中 DataSourceServiceException - exception.public void reload()
DataSourceServicereload 在接口中 DataSourceServicepublic DataSource getDatasource()
public void cleanAndReopenDerby()
throws Exception
Exception - exception.public void restoreDerby(String jdbcUrl, Callable<Void> callable) throws Exception
jdbcUrl - jdbcUrl string value.callable - callable.Exception - exception.public boolean checkMasterWritable()
DataSourceServicecheckMasterWritable 在接口中 DataSourceServicepublic org.springframework.jdbc.core.JdbcTemplate getJdbcTemplate()
DataSourceServicegetJdbcTemplate 在接口中 DataSourceServicepublic org.springframework.transaction.support.TransactionTemplate getTransactionTemplate()
DataSourceServicegetTransactionTemplate 在接口中 DataSourceServicepublic String getCurrentDbUrl()
DataSourceServicegetCurrentDbUrl 在接口中 DataSourceServicepublic String getHealth()
DataSourceServicegetHealth 在接口中 DataSourceServicepublic void setHealthStatus(String healthStatus)
Copyright © 2018–2022 Alibaba Group. All rights reserved.