public interface ConnectionSources<T, S extends ConnectionSourceSettings> extends java.lang.Iterable, java.io.Closeable
Models multiple connection sources
T
- The underlying native type of the ConnectionSource, for example a SQL javax.sql.DataSourceType Params | Return Type | Name and description |
---|---|---|
|
public ConnectionSource<T, S> |
addConnectionSource(java.lang.String name, org.springframework.core.env.PropertyResolver configuration) Adds a new ConnectionSource |
|
public ConnectionSource<T, S> |
addConnectionSource(java.lang.String name, java.util.Map<java.lang.String, java.lang.Object> configuration) Adds a new ConnectionSource |
|
public ConnectionSources<T, S> |
addListener(ConnectionSourcesListener<T, S> listener) Adds a listener |
|
public java.lang.Iterable<ConnectionSource<T, S>> |
getAllConnectionSources()
|
|
public org.springframework.core.env.PropertyResolver |
getBaseConfiguration()
|
|
public ConnectionSource<T, S> |
getConnectionSource(java.lang.String name) Obtain a ConnectionSource by name |
|
public ConnectionSource<T, S> |
getDefaultConnectionSource() Obtains the default ConnectionSource |
|
public ConnectionSourceFactory<T, S> |
getFactory()
|
Methods inherited from class | Name |
---|---|
interface java.lang.Iterable |
java.lang.Iterable#iterator(), java.lang.Iterable#spliterator(), java.lang.Iterable#forEach(java.util.function.Consumer) |
interface java.io.Closeable |
java.io.Closeable#close() |
Adds a new ConnectionSource
name
- The name of the connection sourceconfiguration
- The configurationAdds a new ConnectionSource
name
- The name of the connection sourceconfiguration
- The configurationAdds a listener
listener
- The listener
Obtain a ConnectionSource by name
name
- The name of the sourceObtains the default ConnectionSource