public class SingleConnectionFactoryLookup extends Object implements ConnectionFactoryLookup
ConnectionFactoryLookup
that
simply wraps a single given ConnectionFactory
returned for any connection factory name.Constructor and Description |
---|
SingleConnectionFactoryLookup(io.r2dbc.spi.ConnectionFactory connectionFactory)
Create a new instance of the
SingleConnectionFactoryLookup class. |
Modifier and Type | Method and Description |
---|---|
io.r2dbc.spi.ConnectionFactory |
getConnectionFactory(String connectionFactoryName)
Retrieve the
ConnectionFactory identified by the given name. |
public SingleConnectionFactoryLookup(io.r2dbc.spi.ConnectionFactory connectionFactory)
SingleConnectionFactoryLookup
class.connectionFactory
- the single ConnectionFactory
to wrappublic io.r2dbc.spi.ConnectionFactory getConnectionFactory(String connectionFactoryName) throws ConnectionFactoryLookupFailureException
ConnectionFactoryLookup
ConnectionFactory
identified by the given name.getConnectionFactory
in interface ConnectionFactoryLookup
connectionFactoryName
- the name of the ConnectionFactory
ConnectionFactory
(never null
)ConnectionFactoryLookupFailureException
- if the lookup failed