public final class JPPFDatasourceFactory extends Object
Modifier and Type | Method and Description |
---|---|
void |
clear()
Close and remove all the data sources in this registry.
|
DataSource |
createDataSource(String name,
Properties props)
Create a data source from the specified configuration properties.
|
Map<String,DataSource> |
createDataSources(Properties props)
Create one or more data sources from the specified configuration properties.
|
DataSource |
getDataSource(String name)
Get the data source with the specified name.
|
List<String> |
getDataSourceNames()
Get the names of all currently defined data sources.
|
static JPPFDatasourceFactory |
getInstance()
Get a data source factory.
|
boolean |
removeDataSource(String name)
Remove the data source with the specified name.
|
public static JPPFDatasourceFactory getInstance()
JPPFDatasourceFactory
instance.public DataSource getDataSource(String name)
name
- the name assigned to the data source.null
if no such data source could be retrieved.public List<String> getDataSourceNames()
List
of datasource names.public DataSource createDataSource(String name, Properties props)
name
- the name of the data source to create.props
- the data source configuration properties.DataSource
instance.public Map<String,DataSource> createDataSources(Properties props)
jppf.datasource.<configId>.<property_name> = <property_value>
.props
- the data sources configuration properties.Map
whose keys are the names of the created data sources and whose values are the corresponding DataSource
objects.public boolean removeDataSource(String name)
name
- the name assigned to the datasource.true
if the removal was succcessful, false
if it fails for any reason, including if no data source with the specified name exists.public void clear()
Copyright © 2005-2019 JPPF Team.