Class DistributedPostgresParamValueProcessor
- java.lang.Object
 - 
- org.linuxforhealth.fhir.persistence.params.database.PlainParamValueProcessor
 - 
- org.linuxforhealth.fhir.persistence.params.database.PlainPostgresParamValueProcessor
 - 
- org.linuxforhealth.fhir.persistence.params.database.DistributedPostgresParamValueProcessor
 
 
 
 
- 
- All Implemented Interfaces:
 IParamValueProcessor
public class DistributedPostgresParamValueProcessor extends PlainPostgresParamValueProcessor
For the DISTRIBUTED schema variant used on databases such as Citus, we can't use IDENTITY columns. Instead we have to use values generated by a sequence, which means a slightly different INSERT statement in certain cases 
- 
- 
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 DistributedPostgresParamValueProcessor(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 voidaddMissingCommonCanonicalValues(java.util.List<CommonCanonicalValue> missing)Add the values we think are missing from the database.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_values- 
Methods inherited from class org.linuxforhealth.fhir.persistence.params.database.PlainPostgresParamValueProcessor
onConflict, resolveCommonTokenValues, resolveLogicalResourceIdents 
- 
Methods inherited from class org.linuxforhealth.fhir.persistence.params.database.PlainParamValueProcessor
addMissingCodeSystems, addMissingCommonTokenValues, addMissingLogicalResourceIdents, buildCommonTokenValueSelectStatement, buildLogicalResourceIdentSelectStatement, close, createParameterName, fetchCanonicalIds, fetchCodeSystemIds, fetchCommonTokenValueIds, fetchLogicalResourceIdentIds, publish, pushBatch, resetBatch, resolveCanonicalValues, resolveParameterNames, resolveSystemValues, startBatch 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
DistributedPostgresParamValueProcessor
public DistributedPostgresParamValueProcessor(java.sql.Connection connection, java.lang.String schemaName, IParameterIdentityCache cache)Public constructor- Parameters:
 connection-schemaName-cache-
 
 - 
 
- 
Method Detail
- 
addMissingCommonTokenValues
protected java.util.List<CommonTokenValue> addMissingCommonTokenValues(java.util.List<CommonTokenValue> missing, java.util.Map<CommonTokenValueKey,CommonTokenValue> commonTokenValueMap) throws FHIRPersistenceException
Description copied from class:PlainPostgresParamValueProcessorPostgreSQL-specific approach to insert new values into common_token_values- Overrides:
 addMissingCommonTokenValuesin classPlainPostgresParamValueProcessor- Returns:
 - unresolved ids which now need to be fetched
 - Throws:
 FHIRPersistenceException
 
- 
addMissingCommonCanonicalValues
protected void addMissingCommonCanonicalValues(java.util.List<CommonCanonicalValue> missing) throws FHIRPersistenceException
Description copied from class:PlainParamValueProcessorAdd the values we think are missing from the database. The given list should be sorted to reduce deadlocks- Overrides:
 addMissingCommonCanonicalValuesin classPlainParamValueProcessor- Throws:
 FHIRPersistenceException
 
 - 
 
 -