Class PlainBatchParameterProcessor
- java.lang.Object
-
- org.linuxforhealth.fhir.persistence.params.database.PlainBatchParameterProcessor
-
- All Implemented Interfaces:
IBatchParameterProcessor
public class PlainBatchParameterProcessor extends java.lang.Object implements IBatchParameterProcessor
Processes batched parameters by pushing the values to various JDBC statements based on the plain variant of the schema
-
-
Constructor Summary
Constructors Constructor Description PlainBatchParameterProcessor(java.sql.Connection connection)
Public constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Close any resources we're holding to support a cleaner exitjava.lang.Short
encodeShardKey(java.lang.String requestShard)
Compute the shard key value use to distribute resources among nodes of the databasevoid
process(java.lang.String requestShard, java.lang.String resourceType, java.lang.String logicalId, long logicalResourceId, ParameterNameValue parameterNameValue, DateParameter p)
void
process(java.lang.String requestShard, java.lang.String resourceType, java.lang.String logicalId, long logicalResourceId, ParameterNameValue parameterNameValue, LocationParameter p)
void
process(java.lang.String requestShard, java.lang.String resourceType, java.lang.String logicalId, long logicalResourceId, ParameterNameValue parameterNameValue, NumberParameter p)
void
process(java.lang.String requestShard, java.lang.String resourceType, java.lang.String logicalId, long logicalResourceId, ParameterNameValue parameterNameValue, ProfileParameter p, CommonCanonicalValue commonCanonicalValue)
void
process(java.lang.String requestShard, java.lang.String resourceType, java.lang.String logicalId, long logicalResourceId, ParameterNameValue parameterNameValue, QuantityParameter p, CodeSystemValue codeSystemValue)
void
process(java.lang.String requestShard, java.lang.String resourceType, java.lang.String logicalId, long logicalResourceId, ParameterNameValue parameterNameValue, ReferenceParameter parameter, LogicalResourceIdentValue refLogicalResourceId)
void
process(java.lang.String requestShard, java.lang.String resourceType, java.lang.String logicalId, long logicalResourceId, ParameterNameValue parameterNameValue, SecurityParameter p, CommonTokenValue commonTokenValue)
void
process(java.lang.String requestShard, java.lang.String resourceType, java.lang.String logicalId, long logicalResourceId, ParameterNameValue parameterNameValue, StringParameter parameter)
void
process(java.lang.String requestShard, java.lang.String resourceType, java.lang.String logicalId, long logicalResourceId, ParameterNameValue parameterNameValue, TagParameter p, CommonTokenValue commonTokenValue)
void
process(java.lang.String requestShard, java.lang.String resourceType, java.lang.String logicalId, long logicalResourceId, ParameterNameValue parameterNameValue, TokenParameter p, CommonTokenValue commonTokenValue)
void
pushBatch()
Push any statements that have been batched but not yet executedvoid
reset()
Make sure that each statement that may contain data is cleared before we retry a batchvoid
startBatch()
Start processing a new batch
-
-
-
Method Detail
-
close
public void close()
Close any resources we're holding to support a cleaner exit
-
startBatch
public void startBatch()
Start processing a new batch
-
reset
public void reset()
Make sure that each statement that may contain data is cleared before we retry a batch
-
encodeShardKey
public java.lang.Short encodeShardKey(java.lang.String requestShard)
Description copied from interface:IBatchParameterProcessor
Compute the shard key value use to distribute resources among nodes of the database- Specified by:
encodeShardKey
in interfaceIBatchParameterProcessor
- Returns:
-
pushBatch
public void pushBatch() throws FHIRPersistenceException
Push any statements that have been batched but not yet executed- Throws:
FHIRPersistenceException
-
process
public void process(java.lang.String requestShard, java.lang.String resourceType, java.lang.String logicalId, long logicalResourceId, ParameterNameValue parameterNameValue, StringParameter parameter) throws FHIRPersistenceException
- Specified by:
process
in interfaceIBatchParameterProcessor
- Throws:
FHIRPersistenceException
-
process
public void process(java.lang.String requestShard, java.lang.String resourceType, java.lang.String logicalId, long logicalResourceId, ParameterNameValue parameterNameValue, NumberParameter p) throws FHIRPersistenceException
- Specified by:
process
in interfaceIBatchParameterProcessor
- Throws:
FHIRPersistenceException
-
process
public void process(java.lang.String requestShard, java.lang.String resourceType, java.lang.String logicalId, long logicalResourceId, ParameterNameValue parameterNameValue, QuantityParameter p, CodeSystemValue codeSystemValue) throws FHIRPersistenceException
- Specified by:
process
in interfaceIBatchParameterProcessor
- Throws:
FHIRPersistenceException
-
process
public void process(java.lang.String requestShard, java.lang.String resourceType, java.lang.String logicalId, long logicalResourceId, ParameterNameValue parameterNameValue, LocationParameter p) throws FHIRPersistenceException
- Specified by:
process
in interfaceIBatchParameterProcessor
- Throws:
FHIRPersistenceException
-
process
public void process(java.lang.String requestShard, java.lang.String resourceType, java.lang.String logicalId, long logicalResourceId, ParameterNameValue parameterNameValue, DateParameter p) throws FHIRPersistenceException
- Specified by:
process
in interfaceIBatchParameterProcessor
- Throws:
FHIRPersistenceException
-
process
public void process(java.lang.String requestShard, java.lang.String resourceType, java.lang.String logicalId, long logicalResourceId, ParameterNameValue parameterNameValue, TokenParameter p, CommonTokenValue commonTokenValue) throws FHIRPersistenceException
- Specified by:
process
in interfaceIBatchParameterProcessor
- Throws:
FHIRPersistenceException
-
process
public void process(java.lang.String requestShard, java.lang.String resourceType, java.lang.String logicalId, long logicalResourceId, ParameterNameValue parameterNameValue, TagParameter p, CommonTokenValue commonTokenValue) throws FHIRPersistenceException
- Specified by:
process
in interfaceIBatchParameterProcessor
- Throws:
FHIRPersistenceException
-
process
public void process(java.lang.String requestShard, java.lang.String resourceType, java.lang.String logicalId, long logicalResourceId, ParameterNameValue parameterNameValue, ProfileParameter p, CommonCanonicalValue commonCanonicalValue) throws FHIRPersistenceException
- Specified by:
process
in interfaceIBatchParameterProcessor
- Throws:
FHIRPersistenceException
-
process
public void process(java.lang.String requestShard, java.lang.String resourceType, java.lang.String logicalId, long logicalResourceId, ParameterNameValue parameterNameValue, SecurityParameter p, CommonTokenValue commonTokenValue) throws FHIRPersistenceException
- Specified by:
process
in interfaceIBatchParameterProcessor
- Throws:
FHIRPersistenceException
-
process
public void process(java.lang.String requestShard, java.lang.String resourceType, java.lang.String logicalId, long logicalResourceId, ParameterNameValue parameterNameValue, ReferenceParameter parameter, LogicalResourceIdentValue refLogicalResourceId) throws FHIRPersistenceException
- Specified by:
process
in interfaceIBatchParameterProcessor
- Throws:
FHIRPersistenceException
-
-