public final class ConnectionFactoryOptions extends Object
ConnectionFactorys.| Modifier and Type | Class and Description |
|---|---|
static class |
ConnectionFactoryOptions.Builder
A builder for
ConnectionFactoryOptions instances. |
| Modifier and Type | Field and Description |
|---|---|
static Option<Duration> |
CONNECT_TIMEOUT
Connection timeout.
|
static Option<String> |
DATABASE
Initial database name.
|
static Option<String> |
DRIVER
Driver name.
|
static Option<String> |
HOST
Endpoint host name.
|
static Option<CharSequence> |
PASSWORD
Password for authentication.
|
static Option<Integer> |
PORT
Endpoint port number.
|
static Option<String> |
PROTOCOL
Driver protocol name.
|
static Option<Boolean> |
SSL
Whether to require SSL.
|
static Option<String> |
USER
User for authentication.
|
| Modifier and Type | Method and Description |
|---|---|
static ConnectionFactoryOptions.Builder |
builder()
Returns a new
ConnectionFactoryOptions.Builder. |
<T> T |
getRequiredValue(Option<T> option)
Returns the value for an option if it exists.
|
<T> T |
getValue(Option<T> option)
Returns the value for an option if it exists, otherwise
null. |
boolean |
hasOption(Option<?> option)
Returns
true if the option exists, otherwise false. |
ConnectionFactoryOptions.Builder |
mutate()
Returns a new
ConnectionFactoryOptions.Builder initialized with this ConnectionFactoryOptions. |
static ConnectionFactoryOptions |
parse(CharSequence url)
Parses a R2DBC Connection URL and returns the parsed
ConnectionFactoryOptions. |
String |
toString() |
public static final Option<CharSequence> PASSWORD
public static final Option<String> PROTOCOL
tcp or a database vendor-specific protocol string.public static ConnectionFactoryOptions.Builder builder()
ConnectionFactoryOptions.Builder.ConnectionFactoryOptions.Builderpublic static ConnectionFactoryOptions parse(CharSequence url)
ConnectionFactoryOptions.
URL format:
r2dbc:driver[:protocol]://[user:password@]host[:port][/path][?option=value]}.url - the R2DBC URL.ConnectionFactoryOptions.public ConnectionFactoryOptions.Builder mutate()
ConnectionFactoryOptions.Builder initialized with this ConnectionFactoryOptions.ConnectionFactoryOptions.Builderpublic <T> T getRequiredValue(Option<T> option)
T - the type of the valueoption - the option to retrieve the value forIllegalArgumentException - if option is nullIllegalStateException - if there is no value for option@Nullable public <T> T getValue(Option<T> option)
null.T - the type of the valueoption - the option to retrieve the value fornullIllegalArgumentException - if option is nullpublic boolean hasOption(Option<?> option)
true if the option exists, otherwise false.option - the option to test fortrue if the option exists, otherwise falseIllegalArgumentException - if option is nullCopyright © 2019. All rights reserved.