Class PlainPostgresParamValueProcessor
- java.lang.Object
-
- org.linuxforhealth.fhir.persistence.params.database.PlainParamValueProcessor
-
- org.linuxforhealth.fhir.persistence.params.database.PlainPostgresParamValueProcessor
-
- All Implemented Interfaces:
IParamValueProcessor
- Direct Known Subclasses:
DistributedPostgresParamValueProcessor
public class PlainPostgresParamValueProcessor extends PlainParamValueProcessor
PostgreSQL variant of the remote index message handler
-
-
Field Summary
-
Fields inherited from class org.linuxforhealth.fhir.persistence.params.database.PlainParamValueProcessor
connection, FIXED_SHARD, identityCache, maxCodeSystemsPerStatement, maxCommonCanonicalValuesPerStatement, maxCommonTokenValuesPerStatement, maxLogicalResourcesPerStatement, schemaName, translator
-
-
Constructor Summary
Constructors Constructor Description PlainPostgresParamValueProcessor(java.sql.Connection connection, java.lang.String schemaName, IParameterIdentityCache cache)
Public constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.List<CommonTokenValue>
addMissingCommonTokenValues(java.util.List<CommonTokenValue> missing, java.util.Map<CommonTokenValueKey,CommonTokenValue> commonTokenValueMap)
PostgreSQL-specific approach to insert new values into common_token_valuesprotected java.lang.String
onConflict()
void
resolveCommonTokenValues(java.util.List<CommonTokenValue> unresolvedTokenValues, java.util.Map<CommonTokenValueKey,CommonTokenValue> commonTokenValueMap)
Make sure we have values for all the common_token_value records we have collected in the current batchvoid
resolveLogicalResourceIdents(java.util.List<LogicalResourceIdentValue> unresolvedLogicalResourceIdents, java.util.Map<LogicalResourceIdentKey,LogicalResourceIdentValue> logicalResourceIdentMap)
Make sure we have values for all the logical_resource_ident values we have collected in the current batch.-
Methods inherited from class org.linuxforhealth.fhir.persistence.params.database.PlainParamValueProcessor
addMissingCodeSystems, addMissingCommonCanonicalValues, addMissingCommonTokenValues, addMissingLogicalResourceIdents, buildCommonTokenValueSelectStatement, buildLogicalResourceIdentSelectStatement, close, createParameterName, fetchCanonicalIds, fetchCodeSystemIds, fetchCommonTokenValueIds, fetchLogicalResourceIdentIds, publish, pushBatch, resetBatch, resolveCanonicalValues, resolveParameterNames, resolveSystemValues, startBatch
-
-
-
-
Constructor Detail
-
PlainPostgresParamValueProcessor
public PlainPostgresParamValueProcessor(java.sql.Connection connection, java.lang.String schemaName, IParameterIdentityCache cache)
Public constructor- Parameters:
connection
-schemaName
-cache
-
-
-
Method Detail
-
onConflict
protected java.lang.String onConflict()
- Specified by:
onConflict
in classPlainParamValueProcessor
-
resolveLogicalResourceIdents
public void resolveLogicalResourceIdents(java.util.List<LogicalResourceIdentValue> unresolvedLogicalResourceIdents, java.util.Map<LogicalResourceIdentKey,LogicalResourceIdentValue> logicalResourceIdentMap) throws FHIRPersistenceException
Description copied from interface:IParamValueProcessor
Make sure we have values for all the logical_resource_ident values we have collected in the current batch. Need to make sure these are added in order to minimize deadlocks. Note that because we may create new logical_resource_ident records, we could be blocked by the main add_any_resource procedure run within the server CREATE/UPDATE- Specified by:
resolveLogicalResourceIdents
in interfaceIParamValueProcessor
- Overrides:
resolveLogicalResourceIdents
in classPlainParamValueProcessor
- Throws:
FHIRPersistenceException
-
resolveCommonTokenValues
public void resolveCommonTokenValues(java.util.List<CommonTokenValue> unresolvedTokenValues, java.util.Map<CommonTokenValueKey,CommonTokenValue> commonTokenValueMap) throws FHIRPersistenceException
Description copied from class:PlainParamValueProcessor
Make sure we have values for all the common_token_value records we have collected in the current batch- Specified by:
resolveCommonTokenValues
in interfaceIParamValueProcessor
- Overrides:
resolveCommonTokenValues
in classPlainParamValueProcessor
- Throws:
FHIRPersistenceException
-
addMissingCommonTokenValues
protected java.util.List<CommonTokenValue> addMissingCommonTokenValues(java.util.List<CommonTokenValue> missing, java.util.Map<CommonTokenValueKey,CommonTokenValue> commonTokenValueMap) throws FHIRPersistenceException
PostgreSQL-specific approach to insert new values into common_token_values- Parameters:
missing
-commonTokenValueMap
-- Returns:
- unresolved ids which now need to be fetched
- Throws:
FHIRPersistenceException
-
-