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 TypeMethodDescriptionRetrieves connections to all hosts in the cluster (including a connection to a primary host).Retrieves connection to a primary host in the cluster.
-
Method Details
-
getConnectionToPrimary
Retrieves connection to a primary host in the cluster.- Returns:
PgConnectionto a primary host in the cluster
-
getConnectionsToAllHostsInCluster
Retrieves connections to all hosts in the cluster (including a connection to a primary host).- Returns:
Setof connections to all hosts in target cluster
-