
Package ca.uhn.fhir.jpa.model.config
Class PartitionSettings
java.lang.Object
ca.uhn.fhir.jpa.model.config.PartitionSettings
- All Implemented Interfaces:
 ca.uhn.fhir.interceptor.model.IDefaultPartitionSettings
public class PartitionSettings
extends Object
implements ca.uhn.fhir.interceptor.model.IDefaultPartitionSettings
- Since:
 - 5.0.0
 
- 
Nested Class Summary
Nested Classes - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionShould resources references be permitted to cross partition boundaries.If set, the given ID will be used for the default partition.booleanIf enabled the JPA server will allow unqualified cross partition referencebooleanShould we always open a new database transaction if the partition context changesbooleanTheResourceSearchUrlEntitytable is used to prevent accidental concurrent conditional create/update operations from creating duplicate resources by inserting a row in that table as a part of the database transaction performing the write operation.booleanThis flag activates partition IDs in PKs mode, which is newly introduced in HAPI FHIR 8.0.0.booleanIf set totrue(default isfalse) thePARTITION_IDvalue will be factored into the hash values used in theHFJ_SPIDX_xxxtables, removing the need to explicitly add a selector on this column in queries.booleanIf enabled (default isfalse) the JPA server will support data partitioningbooleanIf set totrue(default isfalse), partitions will be unnamed and all IDs fromInteger.MIN_VALUEthroughInteger.MAX_VALUEwill be allowed without needing to be created ahead of time.setAllowReferencesAcrossPartitions(PartitionSettings.CrossPartitionReferenceMode theAllowReferencesAcrossPartitions) Should resources references be permitted to cross partition boundaries.setAlwaysOpenNewTransactionForDifferentPartition(boolean theAlwaysOpenNewTransactionForDifferentPartition) Should we always open a new database transaction if the partition context changessetConditionalCreateDuplicateIdentifiersEnabled(boolean theConditionalCreateDuplicateIdentifiersEnabled) TheResourceSearchUrlEntitytable is used to prevent accidental concurrent conditional create/update operations from creating duplicate resources by inserting a row in that table as a part of the database transaction performing the write operation.setDatabasePartitionMode(boolean theDatabasePartitionMode) This flag activates partition IDs in PKs mode, which is newly introduced in HAPI FHIR 8.0.0.setDefaultPartitionId(Integer theDefaultPartitionId) If set, the given ID will be used for the default partition.setIncludePartitionInSearchHashes(boolean theIncludePartitionInSearchHashes) If set totrue(default isfalse) thePARTITION_IDvalue will be factored into the hash values used in theHFJ_SPIDX_xxxtables, removing the need to explicitly add a selector on this column in queries.setPartitioningEnabled(boolean thePartitioningEnabled) If enabled (default isfalse) the JPA server will support data partitioningsetUnnamedPartitionMode(boolean theUnnamedPartitionMode) If set totrue(default isfalse), partitions will be unnamed and all IDs fromInteger.MIN_VALUEthroughInteger.MAX_VALUEwill be allowed without needing to be created ahead of time.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ca.uhn.fhir.interceptor.model.IDefaultPartitionSettings
getDefaultRequestPartitionId, hasDefaultPartitionId, isDefaultPartition 
- 
Constructor Details
- 
PartitionSettings
public PartitionSettings() 
 - 
 - 
Method Details
- 
isDatabasePartitionMode
This flag activates partition IDs in PKs mode, which is newly introduced in HAPI FHIR 8.0.0. This mode causes partition IDs to be included in all primary keys, joins, and emitted SQL. It also affects the generated schema and migrations. This setting should not be changed after the database has been initialized, unless you have performed an appropriate migration.- Since:
 - 8.0.0
 
 - 
setDatabasePartitionMode
This flag activates partition IDs in PKs mode, which is newly introduced in HAPI FHIR 8.0.0. This mode causes partition IDs to be included in all primary keys, joins, and emitted SQL. It also affects the generated schema and migrations. This setting should not be changed after the database has been initialized, unless you have performed an appropriate migration.- Since:
 - 8.0.0
 
 - 
isAlwaysOpenNewTransactionForDifferentPartition
Should we always open a new database transaction if the partition context changes- Since:
 - 6.6.0
 
 - 
setAlwaysOpenNewTransactionForDifferentPartition
public PartitionSettings setAlwaysOpenNewTransactionForDifferentPartition(boolean theAlwaysOpenNewTransactionForDifferentPartition) Should we always open a new database transaction if the partition context changes- Since:
 - 6.6.0
 
 - 
isIncludePartitionInSearchHashes
If set totrue(default isfalse) thePARTITION_IDvalue will be factored into the hash values used in theHFJ_SPIDX_xxxtables, removing the need to explicitly add a selector on this column in queries. If set tofalse, an additional selector is used instead, which may perform better when using native database partitioning features.This setting has no effect if partitioning is not enabled via
isPartitioningEnabled().If
StorageSettings.isIndexStorageOptimized()is enabled this setting should be set tofalse. - 
setIncludePartitionInSearchHashes
public PartitionSettings setIncludePartitionInSearchHashes(boolean theIncludePartitionInSearchHashes) If set totrue(default isfalse) thePARTITION_IDvalue will be factored into the hash values used in theHFJ_SPIDX_xxxtables, removing the need to explicitly add a selector on this column in queries. If set tofalse, an additional selector is used instead, which may perform better when using native database partitioning features.This setting has no effect if partitioning is not enabled via
isPartitioningEnabled().If
StorageSettings.isIndexStorageOptimized()is enabled this setting should be set tofalse. - 
isPartitioningEnabled
If enabled (default isfalse) the JPA server will support data partitioning- Since:
 - 5.0.0
 
 - 
setPartitioningEnabled
If enabled (default isfalse) the JPA server will support data partitioning- Since:
 - 5.0.0
 
 - 
getAllowReferencesAcrossPartitions
Should resources references be permitted to cross partition boundaries. Default isPartitionSettings.CrossPartitionReferenceMode.NOT_ALLOWED.- Since:
 - 5.0.0
 
 - 
setAllowReferencesAcrossPartitions
public PartitionSettings setAllowReferencesAcrossPartitions(PartitionSettings.CrossPartitionReferenceMode theAllowReferencesAcrossPartitions) Should resources references be permitted to cross partition boundaries. Default isPartitionSettings.CrossPartitionReferenceMode.NOT_ALLOWED.- Since:
 - 5.0.0
 
 - 
isUnnamedPartitionMode
If set totrue(default isfalse), partitions will be unnamed and all IDs fromInteger.MIN_VALUEthroughInteger.MAX_VALUEwill be allowed without needing to be created ahead of time.- Since:
 - 5.5.0
 
 - 
setUnnamedPartitionMode
If set totrue(default isfalse), partitions will be unnamed and all IDs fromInteger.MIN_VALUEthroughInteger.MAX_VALUEwill be allowed without needing to be created ahead of time.- Since:
 - 5.5.0
 
 - 
getDefaultPartitionId
If set, the given ID will be used for the default partition. The default isnullwhich will result in the use of a null value for default partition items.- Specified by:
 getDefaultPartitionIdin interfaceca.uhn.fhir.interceptor.model.IDefaultPartitionSettings- Since:
 - 5.5.0
 
 - 
setDefaultPartitionId
If set, the given ID will be used for the default partition. The default isnullwhich will result in the use of a null value for default partition items.- Since:
 - 5.5.0
 
 - 
isAllowUnqualifiedCrossPartitionReference
If enabled the JPA server will allow unqualified cross partition reference - 
isConditionalCreateDuplicateIdentifiersEnabled
TheResourceSearchUrlEntitytable is used to prevent accidental concurrent conditional create/update operations from creating duplicate resources by inserting a row in that table as a part of the database transaction performing the write operation. If this setting is set to false (which is the default), the partition ID is not written to this table, meaning that duplicates are prevented across partitions. If this setting is true, duplicates will not be prevented if they appear on different partitions. - 
setConditionalCreateDuplicateIdentifiersEnabled
public PartitionSettings setConditionalCreateDuplicateIdentifiersEnabled(boolean theConditionalCreateDuplicateIdentifiersEnabled) TheResourceSearchUrlEntitytable is used to prevent accidental concurrent conditional create/update operations from creating duplicate resources by inserting a row in that table as a part of the database transaction performing the write operation. If this setting is set to false (which is the default), the partition ID is not written to this table, meaning that duplicates are prevented across partitions. If this setting is true, duplicates will not be prevented if they appear on different partitions. 
 -