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_VERSION_ID
-
-
Constructor Summary
Constructors Constructor Description PostgresReindexResourceDAO(Connection connection, IDatabaseTranslator translator, ParameterDAO parameterDao, String schemaName, FHIRDbFlavor flavor, FHIRPersistenceJDBCCache cache, IResourceReferenceDAO rrd)
Public constructorPostgresReindexResourceDAO(Connection connection, IDatabaseTranslator translator, ParameterDAO parameterDao, String schemaName, FHIRDbFlavor flavor, 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(SecureRandom random, Instant reindexTstamp, Integer resourceTypeId, 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
addResourceTypeCacheCandidate, createDTO, deleteFromParameterTable, getCache, getResourceReferenceDAO, getResourceTypeIdFromCaches, getSearchByIdsSql, getTransactionData, history, historyCount, insert, read, readAllResourceTypeNames, readResourceTypeId, search, search, search, searchByIds, searchCount, searchCount, searchCount, searchForIds, searchForIds, searchStringValues, searchWholeSystem, setPersistenceContext, 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(Connection connection, IDatabaseTranslator translator, ParameterDAO parameterDao, String schemaName, FHIRDbFlavor flavor, FHIRPersistenceJDBCCache cache, IResourceReferenceDAO rrd)
Public constructor- Parameters:
connection
-translator
-parameterDao
-schemaName
-flavor
-cache
-rrd
-
-
PostgresReindexResourceDAO
public PostgresReindexResourceDAO(Connection connection, IDatabaseTranslator translator, ParameterDAO parameterDao, String schemaName, FHIRDbFlavor flavor, 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(SecureRandom random, Instant reindexTstamp, Integer resourceTypeId, String logicalId) throws 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:
Exception
-
-