Index
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form
B
- buildCommonUrlToPrimary(String, String) - Static method in class io.github.mfvanek.pg.connection.host.PgUrlParser
-
Constructs a common (joint) PostgreSQL URL for a primary server.
- buildCommonUrlToPrimary(String, String, Map<String, String>) - Static method in class io.github.mfvanek.pg.connection.host.PgUrlParser
-
Constructs a common (joint) PostgreSQL URL for a primary server.
- buildCommonUrlToPrimary(Set<String>) - Static method in class io.github.mfvanek.pg.connection.host.PgUrlParser
-
Constructs a common (joint) PostgreSQL URL for a primary server.
- buildCommonUrlToPrimary(Set<String>, Map<String, String>) - Static method in class io.github.mfvanek.pg.connection.host.PgUrlParser
-
Constructs a common (joint) PostgreSQL URL for a primary server.
C
- canBePrimary() - Method in interface io.github.mfvanek.pg.connection.host.PgHost
-
Determines whether this host can be a primary host.
- canBePrimary() - Method in class io.github.mfvanek.pg.connection.host.PgHostImpl
-
Determines whether this host can be a primary host.
- cannotBePrimary() - Method in interface io.github.mfvanek.pg.connection.host.PgHost
-
Determines whether this host cannot act as a primary host.
- ConnectionCredentials - Class in io.github.mfvanek.pg.connection.factory
-
Immutable parameters for connecting to the database.
D
- dataSourceFor(String, String, String) - Method in interface io.github.mfvanek.pg.connection.factory.PgConnectionFactory
-
Provides a
DataSourceobject configured with the specified PostgreSQL connection URL, username, and password. - dataSourceFor(String, String, String) - Method in class io.github.mfvanek.pg.connection.factory.PgConnectionFactoryImpl
-
Provides a
DataSourceobject configured with the specified PostgreSQL connection URL, username, and password.
E
- equals(Object) - Method in class io.github.mfvanek.pg.connection.factory.ConnectionCredentials
- equals(Object) - Method in class io.github.mfvanek.pg.connection.host.PgHostImpl
- equals(Object) - Method in class io.github.mfvanek.pg.connection.PgConnectionImpl
- extractNameWithPortAndUrlForEachHost(String) - Static method in class io.github.mfvanek.pg.connection.host.PgUrlParser
-
Extracts host-port pairs and builds replica-compatible connection URLs for each host.
F
- forUrl(String, String, String) - Method in interface io.github.mfvanek.pg.connection.factory.PgConnectionFactory
-
Creates a
PgConnectionobject using the given PostgreSQL connection URL, username, and password. - forUrl(String, String, String) - Method in class io.github.mfvanek.pg.connection.factory.PgConnectionFactoryImpl
-
Creates a
PgConnectionobject using the given PostgreSQL connection URL, username, and password.
G
- getConnectionsToAllHostsInCluster() - Method in interface io.github.mfvanek.pg.connection.HighAvailabilityPgConnection
-
Retrieves connections to all hosts in the cluster (including a connection to a primary host).
- getConnectionsToAllHostsInCluster() - Method in class io.github.mfvanek.pg.connection.HighAvailabilityPgConnectionImpl
-
Retrieves connections to all hosts in the cluster (including a connection to a primary host).
- getConnectionToPrimary() - Method in interface io.github.mfvanek.pg.connection.HighAvailabilityPgConnection
-
Retrieves connection to a primary host in the cluster.
- getConnectionToPrimary() - Method in class io.github.mfvanek.pg.connection.HighAvailabilityPgConnectionImpl
-
Retrieves connection to a primary host in the cluster.
- getConnectionUrls() - Method in class io.github.mfvanek.pg.connection.factory.ConnectionCredentials
-
Retrieves a set of connection strings for accessing all hosts in the database cluster.
- getDataSource() - Method in interface io.github.mfvanek.pg.connection.PgConnection
-
Retrieves a standard
DataSourceobject to access the database. - getDataSource() - Method in class io.github.mfvanek.pg.connection.PgConnectionImpl
-
Retrieves a standard
DataSourceobject to access the database. - getHost() - Method in interface io.github.mfvanek.pg.connection.host.HostAware
-
Retrieves information about host in the cluster.
- getHost() - Method in class io.github.mfvanek.pg.connection.PgConnectionImpl
-
Retrieves information about host in the cluster.
- getName() - Method in interface io.github.mfvanek.pg.connection.host.PgHost
-
Retrieves the name of this host.
- getName() - Method in class io.github.mfvanek.pg.connection.host.PgHostImpl
-
Retrieves the name of this host.
- getPassword() - Method in class io.github.mfvanek.pg.connection.factory.ConnectionCredentials
-
Retrieves the user's password for connecting to the database.
- getPgUrl() - Method in interface io.github.mfvanek.pg.connection.host.PgHost
-
Retrieves a valid connection string to this host.
- getPgUrl() - Method in class io.github.mfvanek.pg.connection.host.PgHostImpl
-
Retrieves a valid connection string to this host.
- getPort() - Method in interface io.github.mfvanek.pg.connection.host.PgHost
-
Retrieves the port of this host.
- getPort() - Method in class io.github.mfvanek.pg.connection.host.PgHostImpl
-
Retrieves the port of this host.
- getUserName() - Method in class io.github.mfvanek.pg.connection.factory.ConnectionCredentials
-
Retrieves the name of the user to connect to the database.
H
- hashCode() - Method in class io.github.mfvanek.pg.connection.factory.ConnectionCredentials
- hashCode() - Method in class io.github.mfvanek.pg.connection.host.PgHostImpl
- hashCode() - Method in class io.github.mfvanek.pg.connection.PgConnectionImpl
- HighAvailabilityPgConnection - Interface in io.github.mfvanek.pg.connection
-
An abstraction of a connection to a high availability cluster (with set of primary host and replicas).
- HighAvailabilityPgConnectionFactory - Interface in io.github.mfvanek.pg.connection.factory
-
Factory interface for creating instances of
HighAvailabilityPgConnection. - HighAvailabilityPgConnectionFactoryImpl - Class in io.github.mfvanek.pg.connection.factory
-
Implementation of
HighAvailabilityPgConnectionFactoryfor creating connections to high-availability PostgreSQL clusters. - HighAvailabilityPgConnectionFactoryImpl(PgConnectionFactory, PrimaryHostDeterminer) - Constructor for class io.github.mfvanek.pg.connection.factory.HighAvailabilityPgConnectionFactoryImpl
-
Constructs an instance of
HighAvailabilityPgConnectionFactoryImpl. - HighAvailabilityPgConnectionImpl - Class in io.github.mfvanek.pg.connection
-
Implementation of a connection to a high availability cluster (with set of primary host and replicas).
- HostAware - Interface in io.github.mfvanek.pg.connection.host
-
Allows getting information about database host.
I
- io.github.mfvanek.pg.connection - package io.github.mfvanek.pg.connection
-
PostgreSQL connection related classes and interfaces.
- io.github.mfvanek.pg.connection.exception - package io.github.mfvanek.pg.connection.exception
-
Custom exceptions.
- io.github.mfvanek.pg.connection.factory - package io.github.mfvanek.pg.connection.factory
-
PostgreSQL connection factory related classes and interfaces.
- io.github.mfvanek.pg.connection.host - package io.github.mfvanek.pg.connection.host
-
PostgreSQL host related classes and interfaces.
- isPrimary(PgConnection) - Method in interface io.github.mfvanek.pg.connection.PrimaryHostDeterminer
-
Determines whether given connection is a connection to a primary host.
- isPrimary(PgConnection) - Method in class io.github.mfvanek.pg.connection.PrimaryHostDeterminerImpl
-
Determines whether given connection is a connection to a primary host.
O
- of(ConnectionCredentials) - Method in interface io.github.mfvanek.pg.connection.factory.HighAvailabilityPgConnectionFactory
-
Creates instance of
HighAvailabilityPgConnectionwith given credentials. - of(ConnectionCredentials) - Method in class io.github.mfvanek.pg.connection.factory.HighAvailabilityPgConnectionFactoryImpl
-
Creates instance of
HighAvailabilityPgConnectionwith given credentials. - of(PgConnection) - Static method in class io.github.mfvanek.pg.connection.HighAvailabilityPgConnectionImpl
-
Constructs a
HighAvailabilityPgConnectionobject with the givenPgConnection. - of(PgConnection, Collection<PgConnection>) - Static method in class io.github.mfvanek.pg.connection.HighAvailabilityPgConnectionImpl
-
Constructs a
HighAvailabilityPgConnectionobject with the given connections to primary and replicas. - of(PgConnection, Collection<PgConnection>, long) - Static method in class io.github.mfvanek.pg.connection.HighAvailabilityPgConnectionImpl
-
Constructs a
HighAvailabilityPgConnectionobject with the given connections to primary and replicas and a refresh interval. - of(Collection<String>, String, String) - Static method in class io.github.mfvanek.pg.connection.factory.ConnectionCredentials
-
Creates a
ConnectionCredentialsobject with multiple connection URLs. - of(DataSource, PgHost) - Static method in class io.github.mfvanek.pg.connection.PgConnectionImpl
-
Constructs a
PgConnectionobject with given dataSource and host. - ofUrl(String) - Static method in class io.github.mfvanek.pg.connection.host.PgHostImpl
-
Constructs a
PgHostobject from given JDBC connection string. - ofUrl(String, String, String) - Static method in class io.github.mfvanek.pg.connection.factory.ConnectionCredentials
-
Creates a
ConnectionCredentialsobject for a single connection URL. - ofUrl(String, String, String) - Method in interface io.github.mfvanek.pg.connection.factory.HighAvailabilityPgConnectionFactory
-
Creates an instance of
HighAvailabilityPgConnectionfor a given write URL and credentials. - ofUrl(DataSource, String) - Static method in class io.github.mfvanek.pg.connection.PgConnectionImpl
-
Constructs a
PgConnectionobject with given dataSource and connection string. - ofUrls(Collection<String>, String, String) - Method in interface io.github.mfvanek.pg.connection.factory.HighAvailabilityPgConnectionFactory
-
Creates an instance of
HighAvailabilityPgConnectionfor multiple connection URLs and credentials.
P
- PgConnection - Interface in io.github.mfvanek.pg.connection
-
A wrapper of standard
DataSourceinterface with awareness of real host. - PgConnectionFactory - Interface in io.github.mfvanek.pg.connection.factory
-
Factory interface for creating PostgreSQL connections and data sources.
- PgConnectionFactoryImpl - Class in io.github.mfvanek.pg.connection.factory
-
A concrete implementation of the
PgConnectionFactoryinterface. - PgConnectionFactoryImpl() - Constructor for class io.github.mfvanek.pg.connection.factory.PgConnectionFactoryImpl
-
Default constructor for the
PgConnectionFactoryImplclass. - PgConnectionImpl - Class in io.github.mfvanek.pg.connection
-
A standard implementation of
PgConnectioninterface with awareness of real host. - PgHost - Interface in io.github.mfvanek.pg.connection.host
-
An abstraction of database host.
- PgHostImpl - Class in io.github.mfvanek.pg.connection.host
-
An immutable standard implementation of
PgHostinterface. - PgSqlException - Exception in io.github.mfvanek.pg.connection.exception
-
Custom unchecked exception for SQL errors.
- PgSqlException(SQLException) - Constructor for exception io.github.mfvanek.pg.connection.exception.PgSqlException
-
Constructs a new
PgSqlExceptionwith the specified cause. - pgUrlNotBlankAndValid(String, String) - Static method in class io.github.mfvanek.pg.connection.host.PgUrlValidators
-
Validates that a PostgreSQL URL is not blank and has a valid format.
- PgUrlParser - Class in io.github.mfvanek.pg.connection.host
-
Utility class for parsing and manipulating PostgreSQL connection URLs.
- PgUrlValidators - Class in io.github.mfvanek.pg.connection.host
-
Utility class providing validation methods for PostgreSQL connection string (URL).
- PrimaryHostDeterminer - Interface in io.github.mfvanek.pg.connection
-
Represents a service that determines if a given database connection is established with a primary host.
- PrimaryHostDeterminerImpl - Class in io.github.mfvanek.pg.connection
-
Standard implementation of a service that determines if a given database connection is established with a primary host.
- PrimaryHostDeterminerImpl() - Constructor for class io.github.mfvanek.pg.connection.PrimaryHostDeterminerImpl
-
Default constructor for the PrimaryHostDeterminerImpl class.
T
- TESTCONTAINERS_PG_URL_PREFIX - Static variable in class io.github.mfvanek.pg.connection.host.PgUrlParser
-
The URL prefix used in Testcontainers to initialize PostgreSQL containers.
- toString() - Method in class io.github.mfvanek.pg.connection.factory.ConnectionCredentials
- toString() - Method in class io.github.mfvanek.pg.connection.host.PgHostImpl
- toString() - Method in class io.github.mfvanek.pg.connection.PgConnectionImpl
U
- URL_HEADER - Static variable in class io.github.mfvanek.pg.connection.host.PgUrlParser
-
Header prefix for PostgreSQL JDBC URLs.
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form