Package org.clazzes.util.jdbc.provider
Class JdbcProviderApiImpl
- java.lang.Object
-
- org.clazzes.util.sched.impl.JobStatusServiceImpl
-
- org.clazzes.util.jdbc.provider.JdbcProviderApiImpl
-
- All Implemented Interfaces:
IJdbcProviderApi,org.clazzes.util.sched.api.IJobStatusService
public class JdbcProviderApiImpl extends org.clazzes.util.sched.impl.JobStatusServiceImpl implements IJdbcProviderApi
The implementation of the external monitoring API.
-
-
Constructor Summary
Constructors Constructor Description JdbcProviderApiImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Boolean>listDataSources()UUIDrestartDataSource(String datasourceName)Restart a configured datasource.voidsetDataSourceKeeper(IDataSourceKeeper dataSourceKeeper)voidsetSecretsService(BiFunction<String,String,String> secretsService)UUIDtestAllDataSources()Test all configured datasources.UUIDtestConnection(String url, Map<String,String> additionalProperties)Test a not yet configured JDBC connection.UUIDtestDataSource(String datasourceName)Test an already configured datasource.-
Methods inherited from class org.clazzes.util.sched.impl.JobStatusServiceImpl
cancelJob, getJobStatus, getOneTimeScheduler, isAllowCancelTimedJob, setAllowCancelTimedJob, setOneTimeScheduler, waitForJob
-
-
-
-
Method Detail
-
testConnection
public UUID testConnection(String url, Map<String,String> additionalProperties)
Description copied from interface:IJdbcProviderApiTest a not yet configured JDBC connection.- Specified by:
testConnectionin interfaceIJdbcProviderApi- Parameters:
url- The JDBC URL to test.additionalProperties- Any additional properties likeusername,password, ... as mentioned in the description ofJdbcProvider.- Returns:
- An UUID of a job to query with
IJobStatusService.getJobStatus(UUID). The job will have a result type ofBoolean.
-
testDataSource
public UUID testDataSource(String datasourceName)
Description copied from interface:IJdbcProviderApiTest an already configured datasource.- Specified by:
testDataSourcein interfaceIJdbcProviderApi- Parameters:
datasourceName- The name of the configured datasource to test.- Returns:
- An UUID of a job to query with
IJobStatusService.getJobStatus(UUID). The job will have a result type ofBoolean.
-
testAllDataSources
public UUID testAllDataSources()
Description copied from interface:IJdbcProviderApiTest all configured datasources.- Specified by:
testAllDataSourcesin interfaceIJdbcProviderApi- Returns:
- An UUID of a job to query with
IJobStatusService.getJobStatus(UUID). The job will have a result type ofIntegerrepresenting the number of successfully tested datasources.
-
restartDataSource
public UUID restartDataSource(String datasourceName)
Description copied from interface:IJdbcProviderApiRestart a configured datasource.- Specified by:
restartDataSourcein interfaceIJdbcProviderApi- Parameters:
datasourceName- The name of the configured datasource to restart.- Returns:
- An UUID of a job to query with
IJobStatusService.getJobStatus(UUID). The job will have a result type ofBoolean.
-
listDataSources
public Map<String,Boolean> listDataSources()
- Specified by:
listDataSourcesin interfaceIJdbcProviderApi- Returns:
- A list of datasources along with their activation status.
-
setDataSourceKeeper
public void setDataSourceKeeper(IDataSourceKeeper dataSourceKeeper)
-
setSecretsService
public void setSecretsService(BiFunction<String,String,String> secretsService)
-
-