public final class ConnectionFactoryBuilder
extends java.lang.Object
ConnectionFactory
.Modifier and Type | Method and Description |
---|---|
io.r2dbc.spi.ConnectionFactory |
build()
Build a
ConnectionFactory based on the state of this builder. |
io.r2dbc.spi.ConnectionFactoryOptions |
buildOptions()
Build a
ConnectionFactoryOptions based on the state of this builder. |
ConnectionFactoryBuilder |
configure(java.util.function.Consumer<io.r2dbc.spi.ConnectionFactoryOptions.Builder> options)
Configure additional options.
|
ConnectionFactoryBuilder |
database(java.lang.String database)
Configure the database.
|
static ConnectionFactoryBuilder |
derivedFrom(io.r2dbc.spi.ConnectionFactory connectionFactory)
Initialize a new
ConnectionFactoryBuilder derived from the options of the
specified connectionFactory . |
ConnectionFactoryBuilder |
hostname(java.lang.String host)
Configure the host name.
|
ConnectionFactoryBuilder |
password(java.lang.CharSequence password)
Configure the password.
|
ConnectionFactoryBuilder |
port(int port)
Configure the port.
|
ConnectionFactoryBuilder |
username(java.lang.String username)
Configure the username.
|
static ConnectionFactoryBuilder |
withOptions(io.r2dbc.spi.ConnectionFactoryOptions.Builder options)
Initialize a new
ConnectionFactoryBuilder based on the specified
options . |
static ConnectionFactoryBuilder |
withUrl(java.lang.String url)
Initialize a new
ConnectionFactoryBuilder based on the specified R2DBC url. |
public static ConnectionFactoryBuilder withUrl(java.lang.String url)
ConnectionFactoryBuilder
based on the specified R2DBC url.url
- the url to useEmbeddedDatabaseConnection.getUrl(String)
public static ConnectionFactoryBuilder withOptions(io.r2dbc.spi.ConnectionFactoryOptions.Builder options)
ConnectionFactoryBuilder
based on the specified
options
.options
- the options to use to initialize the builderoptions
public static ConnectionFactoryBuilder derivedFrom(io.r2dbc.spi.ConnectionFactory connectionFactory)
ConnectionFactoryBuilder
derived from the options of the
specified connectionFactory
.connectionFactory
- the connection factory whose options are to be used to
initialize the builderpublic ConnectionFactoryBuilder configure(java.util.function.Consumer<io.r2dbc.spi.ConnectionFactoryOptions.Builder> options)
options
- a Consumer
to customize the optionspublic ConnectionFactoryBuilder username(java.lang.String username)
username
- the connection factory usernamepublic ConnectionFactoryBuilder password(java.lang.CharSequence password)
password
- the connection factory passwordpublic ConnectionFactoryBuilder hostname(java.lang.String host)
host
- the connection factory hostnamepublic ConnectionFactoryBuilder port(int port)
port
- the connection factory portpublic ConnectionFactoryBuilder database(java.lang.String database)
database
- the connection factory databasepublic io.r2dbc.spi.ConnectionFactory build()
ConnectionFactory
based on the state of this builder.public io.r2dbc.spi.ConnectionFactoryOptions buildOptions()
ConnectionFactoryOptions
based on the state of this builder.