Package io.github.mfvanek.pg.connection
Interface HighAvailabilityPgConnection
- All Known Implementing Classes:
HighAvailabilityPgConnectionImpl
public interface HighAvailabilityPgConnection
An abstraction of a connection to a high availability cluster (with set of primary host and replicas).
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionGets connections to all hosts in the cluster (including a connection to a primary host).Gets connection to a primary host in the cluster.
-
Method Details
-
getConnectionToPrimary
Gets connection to a primary host in the cluster.- Returns:
PgConnection
to a primary host in the cluster
-
getConnectionsToAllHostsInCluster
Gets connections to all hosts in the cluster (including a connection to a primary host).- Returns:
Set
of connections to all hosts in target cluster
-