Package ca.uhn.fhir.jpa.model.config
Class PartitionSettings
java.lang.Object
ca.uhn.fhir.jpa.model.config.PartitionSettings
- Since:
- 5.0.0
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
static enum
-
Constructor Summary
-
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.boolean
If enabled the JPA server will allow unqualified cross partition referenceboolean
Should we always open a new database transaction if the partition context changesboolean
boolean
If set totrue
(default isfalse
) thePARTITION_ID
value will be factored into the hash values used in theHFJ_SPIDX_xxx
tables, removing the need to explicitly add a selector on this column in queries.boolean
This flag activates partition IDs in PKs mode, which is newly introduced in HAPI FHIR 8.0.0.boolean
If enabled (default isfalse
) the JPA server will support data partitioningboolean
If set totrue
(default isfalse
), partitions will be unnamed and all IDs fromInteger.MIN_VALUE
throughInteger.MAX_VALUE
will be allowed without needing to be created ahead of time.void
setAllowReferencesAcrossPartitions
(PartitionSettings.CrossPartitionReferenceMode theAllowReferencesAcrossPartitions) Should resources references be permitted to cross partition boundaries.void
setAlwaysOpenNewTransactionForDifferentPartition
(boolean theAlwaysOpenNewTransactionForDifferentPartition) Should we always open a new database transaction if the partition context changesvoid
setConditionalCreateDuplicateIdentifiersEnabled
(boolean theConditionalCreateDuplicateIdentifiersEnabled) void
setDefaultPartitionId
(Integer theDefaultPartitionId) If set, the given ID will be used for the default partition.setIncludePartitionInSearchHashes
(boolean theIncludePartitionInSearchHashes) If set totrue
(default isfalse
) thePARTITION_ID
value will be factored into the hash values used in theHFJ_SPIDX_xxx
tables, removing the need to explicitly add a selector on this column in queries.void
setPartitionIdsInPrimaryKeys
(boolean thePartitionIdsInPrimaryKeys) This flag activates partition IDs in PKs mode, which is newly introduced in HAPI FHIR 8.0.0.void
setPartitioningEnabled
(boolean theMultiTenancyEnabled) If enabled (default isfalse
) the JPA server will support data partitioningvoid
setUnnamedPartitionMode
(boolean theUnnamedPartitionMode) If set totrue
(default isfalse
), partitions will be unnamed and all IDs fromInteger.MIN_VALUE
throughInteger.MAX_VALUE
will be allowed without needing to be created ahead of time.
-
Constructor Details
-
PartitionSettings
public PartitionSettings()
-
-
Method Details
-
isPartitionIdsInPrimaryKeys
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
-
setPartitionIdsInPrimaryKeys
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 void 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_ID
value will be factored into the hash values used in theHFJ_SPIDX_xxx
tables, 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_ID
value will be factored into the hash values used in theHFJ_SPIDX_xxx
tables, 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 void 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_VALUE
throughInteger.MAX_VALUE
will 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_VALUE
throughInteger.MAX_VALUE
will 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 isnull
which will result in the use of a null value for default partition items.- Since:
- 5.5.0
-
setDefaultPartitionId
If set, the given ID will be used for the default partition. The default isnull
which 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
-
setConditionalCreateDuplicateIdentifiersEnabled
public void setConditionalCreateDuplicateIdentifiersEnabled(boolean theConditionalCreateDuplicateIdentifiersEnabled)
-