Package io.github.mfvanek.pg.connection
Class ConnectionCredentials
java.lang.Object
io.github.mfvanek.pg.connection.ConnectionCredentials
Parameters for connecting to the database.
-
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Gets a set of connection strings for accessing all hosts in the database cluster.Gets the user's password for connecting to the database.Gets the name of the user to connect to the database.final int
hashCode()
static ConnectionCredentials
of
(Collection<String> connectionUrls, String userName, String password) static ConnectionCredentials
toString()
-
Method Details
-
getConnectionUrls
Gets a set of connection strings for accessing all hosts in the database cluster.- Returns:
- connection urls
-
getUserName
Gets the name of the user to connect to the database.- Returns:
- the name of the user
-
getPassword
Gets the user's password for connecting to the database.- Returns:
- the user's password
-
equals
-
hashCode
public final int hashCode() -
toString
-
of
@Nonnull public static ConnectionCredentials of(@Nonnull Collection<String> connectionUrls, @Nonnull String userName, @Nonnull String password) -
ofUrl
@Nonnull public static ConnectionCredentials ofUrl(@Nonnull String writeUrl, @Nonnull String userName, @Nonnull String password)
-