public final class YamlMasterSlaveDataSourceFactory extends Object
Constructor and Description |
---|
YamlMasterSlaveDataSourceFactory() |
Modifier and Type | Method and Description |
---|---|
static DataSource |
createDataSource(byte[] yamlBytes)
Create master-slave data source.
|
static DataSource |
createDataSource(File yamlFile)
Create master-slave data source.
|
static DataSource |
createDataSource(Map<String,DataSource> dataSourceMap,
byte[] yamlBytes)
Create master-slave data source.
|
static DataSource |
createDataSource(Map<String,DataSource> dataSourceMap,
File yamlFile)
Create master-slave data source.
|
public static DataSource createDataSource(File yamlFile) throws SQLException, IOException
yamlFile
- yaml file for master-slave rule configuration with data sourcesSQLException
- SQL exceptionIOException
- IO exceptionpublic static DataSource createDataSource(byte[] yamlBytes) throws SQLException, IOException
yamlBytes
- yaml bytes for master-slave rule configuration with data sourcesSQLException
- SQL exceptionIOException
- IO exceptionpublic static DataSource createDataSource(Map<String,DataSource> dataSourceMap, File yamlFile) throws SQLException, IOException
dataSourceMap
- data source mapyamlFile
- yaml file for master-slave rule configuration without data sourcesSQLException
- SQL exceptionIOException
- IO exceptionpublic static DataSource createDataSource(Map<String,DataSource> dataSourceMap, byte[] yamlBytes) throws SQLException, IOException
dataSourceMap
- data source mapyamlBytes
- yaml bytes for master-slave rule configuration without data sourcesSQLException
- SQL exceptionIOException
- IO exceptionCopyright © 2018. All rights reserved.