Class PostgresReindexResourceDAO
- java.lang.Object
-
- com.ibm.fhir.persistence.jdbc.dao.impl.FHIRDbDAOImpl
-
- com.ibm.fhir.persistence.jdbc.dao.impl.ResourceDAOImpl
-
- com.ibm.fhir.persistence.jdbc.dao.ReindexResourceDAO
-
- com.ibm.fhir.persistence.jdbc.postgres.PostgresReindexResourceDAO
-
- All Implemented Interfaces:
FHIRDbDAO
,ResourceDAO
public class PostgresReindexResourceDAO extends ReindexResourceDAO
PostgreSQL specialization of the DAO used to assist the reindex custom operation
-
-
Field Summary
-
Fields inherited from class com.ibm.fhir.persistence.jdbc.dao.impl.ResourceDAOImpl
DEFAULT_VALUE_REINDEX_TSTAMP, IDX_DATA, IDX_IS_DELETED, IDX_LAST_UPDATED, IDX_LOGICAL_ID, IDX_LOGICAL_RESOURCE_ID, IDX_RESOURCE_ID, IDX_RESOURCE_PAYLOAD_KEY, IDX_RESOURCE_TYPE_ID, IDX_VERSION_ID
-
-
Constructor Summary
Constructors Constructor Description PostgresReindexResourceDAO(java.sql.Connection connection, IDatabaseTranslator translator, ParameterDAO parameterDao, java.lang.String schemaName, FHIRDbFlavor flavor, FHIRPersistenceJDBCCache cache, IResourceReferenceDAO rrd)
Public constructorPostgresReindexResourceDAO(java.sql.Connection connection, IDatabaseTranslator translator, ParameterDAO parameterDao, java.lang.String schemaName, FHIRDbFlavor flavor, javax.transaction.TransactionSynchronizationRegistry trxSynchRegistry, FHIRPersistenceJDBCCache cache, IResourceReferenceDAO rrd, ParameterTransactionDataImpl ptdi)
Public constructor for use in a JEE context
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResourceIndexRecord
getNextResource(java.security.SecureRandom random, java.time.Instant reindexTstamp, java.lang.Integer resourceTypeId, java.lang.String logicalId)
Pick the next resource to process, then also lock it.-
Methods inherited from class com.ibm.fhir.persistence.jdbc.dao.ReindexResourceDAO
getResource, getResourceToReindex, getTranslator, updateParameterHash, updateParameters
-
Methods inherited from class com.ibm.fhir.persistence.jdbc.dao.impl.ResourceDAOImpl
checkIfNoneMatch, createDTO, deleteFromParameterTable, getCache, getResourceReferenceDAO, getResourceTypeId, getSearchByIdsNoDataSql, getSearchByIdsSql, getTransactionData, history, historyCount, insert, read, readAllResourceTypeNames, readResourceTypeId, search, search, searchByIds, searchCount, searchCount, searchForIds, searchWholeSystem, setInt, setPersistenceContext, setString, versionRead
-
Methods inherited from class com.ibm.fhir.persistence.jdbc.dao.impl.FHIRDbDAOImpl
buildExceptionWithIssue, buildFHIRPersistenceDBConnectException, cleanup, cleanup, createDTOs, getConnection, getFlavor, getSchemaName, isDb2Database, runCountQuery, runCountQuery, runQuery, runQuery, runQuery_STR_VALUES, severe, severe
-
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.ibm.fhir.persistence.jdbc.dao.api.FHIRDbDAO
getConnection, getFlavor, isDb2Database
-
-
-
-
Constructor Detail
-
PostgresReindexResourceDAO
public PostgresReindexResourceDAO(java.sql.Connection connection, IDatabaseTranslator translator, ParameterDAO parameterDao, java.lang.String schemaName, FHIRDbFlavor flavor, FHIRPersistenceJDBCCache cache, IResourceReferenceDAO rrd)
Public constructor- Parameters:
connection
-translator
-parameterDao
-schemaName
-flavor
-cache
-rrd
-
-
PostgresReindexResourceDAO
public PostgresReindexResourceDAO(java.sql.Connection connection, IDatabaseTranslator translator, ParameterDAO parameterDao, java.lang.String schemaName, FHIRDbFlavor flavor, javax.transaction.TransactionSynchronizationRegistry trxSynchRegistry, FHIRPersistenceJDBCCache cache, IResourceReferenceDAO rrd, ParameterTransactionDataImpl ptdi)
Public constructor for use in a JEE context- Parameters:
connection
-translator
-parameterDao
-schemaName
-flavor
-trxSynchRegistry
-cache
-rrd
-
-
-
Method Detail
-
getNextResource
public ResourceIndexRecord getNextResource(java.security.SecureRandom random, java.time.Instant reindexTstamp, java.lang.Integer resourceTypeId, java.lang.String logicalId) throws java.lang.Exception
Description copied from class:ReindexResourceDAO
Pick the next resource to process, then also lock it. Specializations for different databases may use different techniques to optimize locking/concurrency control.- Overrides:
getNextResource
in classReindexResourceDAO
- Parameters:
random
- used to generate a random numberreindexTstamp
- only get resource with a reindex_tstamp less than thisresourceTypeId
- the resource type ID of a specific resource type, or nulllogicalId
- the resource ID of a specific resource, or null- Returns:
- the resource record, or null when there is nothing left to do
- Throws:
java.lang.Exception
-
-