public static final class Credentials.CredentialsBuilder extends Object
Credentials
objects.Modifier and Type | Method and Description |
---|---|
@NotNull Credentials |
build()
Builds a
Credentials object, ready to be passed to Mystral.newDatabase(Credentials) . |
Credentials.CredentialsBuilder |
host(@NotNull String hostName)
Sets the hostname
|
Credentials.CredentialsBuilder |
password(@Nullable String password)
Sets the password for connecting to a data source.
|
Credentials.CredentialsBuilder |
pool(@Nullable String poolName)
Sets the name of the data source connection pool.
|
Credentials.CredentialsBuilder |
port(int port)
Sets the port for connecting to a data source.
|
Credentials.CredentialsBuilder |
schema(@Nullable String schema)
Sets the initial schema to use after the connection to a data source is successfully established.
|
Credentials.CredentialsBuilder |
user(@NotNull String username)
Sets the username for connecting to a data source.
|
public Credentials.CredentialsBuilder host(@NotNull @NotNull String hostName)
hostName
- the hostnamepublic Credentials.CredentialsBuilder port(int port)
port
- the port of the physical data sourcepublic Credentials.CredentialsBuilder user(@NotNull @NotNull String username)
username
- the usernamepublic Credentials.CredentialsBuilder password(@Nullable @Nullable String password)
password
- the passwordpublic Credentials.CredentialsBuilder schema(@Nullable @Nullable String schema)
schema
- an existing database schemapublic Credentials.CredentialsBuilder pool(@Nullable @Nullable String poolName)
poolName
- the name of the pool@NotNull public @NotNull Credentials build()
Credentials
object, ready to be passed to Mystral.newDatabase(Credentials)
.Mystral.newAsyncDatabase(Credentials, Executor)
.Mystral
Copyright © 2021. All rights reserved.