public class DefaultDataSourceHandler extends Object implements DataSourceHandler
Constructor and Description |
---|
DefaultDataSourceHandler(DataSourceFactory dataSourceFactory,
DataSourceStorage dataSourceStorage) |
Modifier and Type | Method and Description |
---|---|
void |
closeDataSource() |
void |
closeDataSource(String dataSourceName) |
<R> R |
withConnection(ConnectionCallback<R> callback) |
<R> R |
withConnection(String dataSourceName,
ConnectionCallback<R> callback) |
<R> R |
withDataSource(DataSourceCallback<R> callback) |
<R> R |
withDataSource(String dataSourceName,
DataSourceCallback<R> callback) |
@Inject public DefaultDataSourceHandler(@Nonnull DataSourceFactory dataSourceFactory, @Nonnull DataSourceStorage dataSourceStorage)
@Nullable public <R> R withDataSource(@Nonnull DataSourceCallback<R> callback)
withDataSource
in interface DataSourceHandler
@Nullable public <R> R withDataSource(@Nonnull String dataSourceName, @Nonnull DataSourceCallback<R> callback)
withDataSource
in interface DataSourceHandler
@Nullable public <R> R withConnection(@Nonnull ConnectionCallback<R> callback)
withConnection
in interface DataSourceHandler
@Nullable public <R> R withConnection(@Nonnull String dataSourceName, @Nonnull ConnectionCallback<R> callback) throws RuntimeSQLException
withConnection
in interface DataSourceHandler
RuntimeSQLException
public void closeDataSource()
closeDataSource
in interface DataSourceHandler
public void closeDataSource(@Nonnull String dataSourceName)
closeDataSource
in interface DataSourceHandler