Class IdDatabase
java.lang.Object
com.io7m.idstore.database.postgres.internal.IdDatabase
- All Implemented Interfaces:
IdDatabaseType,com.io7m.repetoir.core.RPServiceType,AutoCloseable
The default postgres server database implementation.
-
Constructor Summary
ConstructorsConstructorDescriptionIdDatabase(io.opentelemetry.api.OpenTelemetry telemetry, Clock inClock, com.zaxxer.hikari.HikariDataSource inDataSource) The default postgres server database implementation. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()openConnection(IdDatabaseRole role) Open a database connection using the given role.toString()io.opentelemetry.api.trace.Tracertracer()
-
Constructor Details
-
IdDatabase
public IdDatabase(io.opentelemetry.api.OpenTelemetry telemetry, Clock inClock, com.zaxxer.hikari.HikariDataSource inDataSource) The default postgres server database implementation.- Parameters:
telemetry- A telemetry interfaceinClock- The clockinDataSource- A pooled data source
-
-
Method Details
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceIdDatabaseType
-
tracer
public io.opentelemetry.api.trace.Tracer tracer()- Returns:
- The OpenTelemetry tracer
-
openConnection
Description copied from interface:IdDatabaseTypeOpen a database connection using the given role.- Specified by:
openConnectionin interfaceIdDatabaseType- Parameters:
role- The role- Returns:
- A database connection
- Throws:
IdDatabaseException- On errors
-
description
- Specified by:
descriptionin interfacecom.io7m.repetoir.core.RPServiceType
-
toString
-