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.StringonConflict()voidresolveCommonTokenValues(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 batchvoidresolveLogicalResourceIdents(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:
onConflictin classPlainParamValueProcessor
-
resolveLogicalResourceIdents
public void resolveLogicalResourceIdents(java.util.List<LogicalResourceIdentValue> unresolvedLogicalResourceIdents, java.util.Map<LogicalResourceIdentKey,LogicalResourceIdentValue> logicalResourceIdentMap) throws FHIRPersistenceException
Description copied from interface:IParamValueProcessorMake 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:
resolveLogicalResourceIdentsin interfaceIParamValueProcessor- Overrides:
resolveLogicalResourceIdentsin classPlainParamValueProcessor- Throws:
FHIRPersistenceException
-
resolveCommonTokenValues
public void resolveCommonTokenValues(java.util.List<CommonTokenValue> unresolvedTokenValues, java.util.Map<CommonTokenValueKey,CommonTokenValue> commonTokenValueMap) throws FHIRPersistenceException
Description copied from class:PlainParamValueProcessorMake sure we have values for all the common_token_value records we have collected in the current batch- Specified by:
resolveCommonTokenValuesin interfaceIParamValueProcessor- Overrides:
resolveCommonTokenValuesin 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
-
-