public class MultiDataSourceBinding extends DataSourceBinding
Modifier and Type | Class and Description |
---|---|
static class |
MultiDataSourceBinding.AlgorithmType
Describes the failover algorithm used for a multi-data source.
|
RESERVED_TOKEN_DATASOURCE
Constructor and Description |
---|
MultiDataSourceBinding() |
Modifier and Type | Method and Description |
---|---|
MultiDataSourceBinding.AlgorithmType |
getAlgorithmType()
Returns the algorithm type that specifies the strategy of the MultiDataSource.
|
String |
getFailoverCallbackHandler()
Returns the handler to be use on failover.
|
boolean |
getFailoverRequestIfBusy()
Enables the MultiDataSource to failover connection requests to the next data source if all connections in the current data source are in use.
|
String |
getTestFrequency()
Returns the test frequency.
|
MultiDataSourceBinding |
setAlgorithmType(MultiDataSourceBinding.AlgorithmType algorithmType)
Sets the algorithm type that specifies the strategy of the MultiDataSource.
|
MultiDataSourceBinding |
setFailoverCallbackHandler(String failoverCallbackHandler)
Sets the handler to be used for failover.
|
MultiDataSourceBinding |
setFailoverRequestIfBusy(boolean failoverRequestIfBusy)
Enables the MultiDataSource to failover connection requests to the next data source if all connections in the current data source are in use.
|
MultiDataSourceBinding |
setTestFrequency(String testFrequency)
Sets the test frequency.
|
String |
toCompactString()
Returns a compact string representation of the object in JSON format.
|
String |
toString()
Returns a string representation of the object in JSON format.
|
String |
toXmlCompactString()
Returns a compact string representation of the object in XML format.
|
String |
toXmlString()
Returns a string representation of the object in XML format.
|
addSetting, getConnectStrings, getDatabase, getDataSourceName, getParent, getReservedKeywords, getTuningParameters, getVariableValue, isXA, setDataSourceName, setParent, setTuningParameters, setXA, substitute
public MultiDataSourceBinding.AlgorithmType getAlgorithmType()
public String getFailoverCallbackHandler()
public boolean getFailoverRequestIfBusy()
public String getTestFrequency()
public MultiDataSourceBinding setAlgorithmType(MultiDataSourceBinding.AlgorithmType algorithmType)
algorithmType
- the algorithm type that specifies the strategy of the MultiDataSourcepublic MultiDataSourceBinding setFailoverCallbackHandler(String failoverCallbackHandler)
failoverCallbackHandler
- the handler to be used for failoverpublic MultiDataSourceBinding setFailoverRequestIfBusy(boolean failoverRequestIfBusy)
failoverRequestIfBusy
- true if failover is enabled or false otherwisepublic MultiDataSourceBinding setTestFrequency(String testFrequency)
testFrequency
- the test frequencypublic String toXmlCompactString()
toXmlCompactString
in class DataSourceBinding
public String toXmlString()
toXmlString
in class DataSourceBinding
public String toCompactString()
toCompactString
in class DataSourceBinding
public String toString()
toString
in class DataSourceBinding