Package io.github.mfvanek.pg.connection
Class PgConnectionImpl
java.lang.Object
io.github.mfvanek.pg.connection.PgConnectionImpl
- All Implemented Interfaces:
HostAware,PgConnection
A standard implementation of
PgConnection interface with awareness of real host.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionfinal booleanGets a standardDataSourceobject to access the database.getHost()Gets information about host in the cluster.final inthashCode()static PgConnectionof(DataSource dataSource, PgHost host) Constructs aPgConnectionobject with given dataSource and host.toString()
-
Method Details
-
getDataSource
Gets a standardDataSourceobject to access the database.- Specified by:
getDataSourcein interfacePgConnection- Returns:
DataSource
-
getHost
Gets information about host in the cluster. -
of
Constructs aPgConnectionobject with given dataSource and host.- Parameters:
dataSource- a factory for connections to the physical databasehost- information about database host- Returns:
PgConnection- See Also:
-
equals
-
hashCode
public final int hashCode() -
toString
-