Class PgHostImpl
java.lang.Object
io.github.mfvanek.pg.connection.host.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.booleangetName()Retrieves the name of this host.getPgUrl()Retrieves a valid connection string to this host.intgetPort()Retrieves the port of this host.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.host.PgHost
cannotBePrimary
-
Method Details
-
getPgUrl
Retrieves a valid connection string to this host. -
getName
Retrieves the name of this host. -
getPort
public int getPort()Retrieves 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
-
equals
-
hashCode
public int hashCode() -
toString
-
ofUrl
Constructs aPgHostobject from given JDBC connection string.- Parameters:
pgUrl- connection string to a database in JDBC format- Returns:
PgHost
-