public class OptionsCapableConnectionFactory extends Object implements io.r2dbc.spi.Wrapped<io.r2dbc.spi.ConnectionFactory>, io.r2dbc.spi.ConnectionFactory
ConnectionFactory capable of providing access to the
ConnectionFactoryOptions from which it was built.| Constructor and Description |
|---|
OptionsCapableConnectionFactory(io.r2dbc.spi.ConnectionFactoryOptions options,
io.r2dbc.spi.ConnectionFactory delegate)
Create a new
OptionsCapableConnectionFactory that will provide access to
the given options that were used to build the given delegate
ConnectionFactory. |
| Modifier and Type | Method and Description |
|---|---|
org.reactivestreams.Publisher<? extends io.r2dbc.spi.Connection> |
create() |
io.r2dbc.spi.ConnectionFactoryMetadata |
getMetadata() |
io.r2dbc.spi.ConnectionFactoryOptions |
getOptions() |
io.r2dbc.spi.ConnectionFactory |
unwrap() |
static OptionsCapableConnectionFactory |
unwrapFrom(io.r2dbc.spi.ConnectionFactory connectionFactory)
Returns, if possible, an
OptionsCapableConnectionFactory by unwrapping the
given connectionFactory as necessary. |
public OptionsCapableConnectionFactory(io.r2dbc.spi.ConnectionFactoryOptions options,
io.r2dbc.spi.ConnectionFactory delegate)
OptionsCapableConnectionFactory that will provide access to
the given options that were used to build the given delegate
ConnectionFactory.options - the options from which the connection factory was builtdelegate - the delegate connection factory that was built with optionspublic io.r2dbc.spi.ConnectionFactoryOptions getOptions()
public org.reactivestreams.Publisher<? extends io.r2dbc.spi.Connection> create()
create in interface io.r2dbc.spi.ConnectionFactorypublic io.r2dbc.spi.ConnectionFactoryMetadata getMetadata()
getMetadata in interface io.r2dbc.spi.ConnectionFactorypublic io.r2dbc.spi.ConnectionFactory unwrap()
unwrap in interface io.r2dbc.spi.Wrapped<io.r2dbc.spi.ConnectionFactory>public static OptionsCapableConnectionFactory unwrapFrom(io.r2dbc.spi.ConnectionFactory connectionFactory)
OptionsCapableConnectionFactory by unwrapping the
given connectionFactory as necessary. If the given
connectionFactory does not wrap an OptionsCapableConnectionFactory
and is not itself an OptionsCapableConnectionFactory, null is
returned.connectionFactory - the connection factory to unwrapOptionsCapableConnectionFactory or null