Package io.github.mfvanek.pg.connection
Class PgHostImpl
java.lang.Object
io.github.mfvanek.pg.connection.PgHostImpl
- All Implemented Interfaces:
PgHost
A standard implementation of
PgHost interface.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanDetermines whether this host can be a primary host.final booleangetName()Gets the name of this host.getPgUrl()Gets a valid connection string to this host.intgetPort()Gets the port of this host.final inthashCode()static PgHostConstructs aPgHostobject from given JDBC connection string.toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.github.mfvanek.pg.connection.PgHost
cannotBePrimary
-
Method Details
-
getPgUrl
Gets a valid connection string to this host. -
getName
Gets the name of this host. -
getPort
public int getPort()Gets the port of this host. -
canBePrimary
public boolean canBePrimary()Determines whether this host can be a primary host.- Specified by:
canBePrimaryin interfacePgHost- Returns:
trueif this host can be a primary host
-
ofUrl
Constructs aPgHostobject from given JDBC connection string.- Parameters:
pgUrl- connection string to a database in JDBC format- Returns:
PgHost
-
equals
-
hashCode
public final int hashCode() -
toString
-