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(IdDatabaseTelemetry telemetry, Clock inClock, com.zaxxer.hikari.HikariDataSource inDataSource, com.io7m.jmulticlose.core.CloseableCollectionType<IdDatabaseException> inResources) 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(IdDatabaseTelemetry telemetry, Clock inClock, com.zaxxer.hikari.HikariDataSource inDataSource, com.io7m.jmulticlose.core.CloseableCollectionType<IdDatabaseException> inResources) The default postgres server database implementation.- Parameters:
telemetry- A telemetryinClock- The clockinDataSource- A pooled data sourceinResources- The resources to be closed
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceIdDatabaseType- Throws:
IdDatabaseException
-
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
-