Package io.github.mfvanek.pg.connection
Class PgConnectionImpl
- java.lang.Object
-
- io.github.mfvanek.pg.connection.PgConnectionImpl
-
- All Implemented Interfaces:
HostAware
,PgConnection
public class PgConnectionImpl extends java.lang.Object implements PgConnection
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
javax.sql.DataSource
getDataSource()
Gets a standardDataSource
object to access the database.PgHost
getHost()
Gets information about host in the cluster.int
hashCode()
static PgConnection
of(javax.sql.DataSource dataSource, PgHost host)
static PgConnection
ofMaster(javax.sql.DataSource dataSource)
java.lang.String
toString()
-
-
-
Method Detail
-
getDataSource
@Nonnull public javax.sql.DataSource getDataSource()
Description copied from interface:PgConnection
Gets a standardDataSource
object to access the database.- Specified by:
getDataSource
in interfacePgConnection
- Returns:
DataSource
-
getHost
@Nonnull public PgHost getHost()
Description copied from interface:HostAware
Gets information about host in the cluster.
-
ofMaster
@Nonnull public static PgConnection ofMaster(@Nonnull javax.sql.DataSource dataSource)
-
of
@Nonnull public static PgConnection of(@Nonnull javax.sql.DataSource dataSource, @Nonnull PgHost host)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-