Package ca.uhn.fhir.jpa.partition
Class PartitionLookupSvcImpl
java.lang.Object
ca.uhn.fhir.jpa.partition.PartitionLookupSvcImpl
- All Implemented Interfaces:
IPartitionLookupSvc
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreatePartition
(PartitionEntity thePartition, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) void
deletePartition
(Integer thePartitionId) protected <T> T
executeInTransaction
(ICallable<T> theCallable) int
Generate a random postive integer between 1 and Integer.MAX_VALUE, which is guaranteed to be unused by an existing partition.getPartitionById
(Integer thePartitionId) getPartitionByName
(String theName) void
void
start()
This is mostly here for unit test purposes.updatePartition
(PartitionEntity thePartition) static void
validatePartitionIdSupplied
(ca.uhn.fhir.context.FhirContext theFhirContext, Integer thePartitionId)
-
Constructor Details
-
PartitionLookupSvcImpl
public PartitionLookupSvcImpl()Constructor
-
-
Method Details
-
start
Description copied from interface:IPartitionLookupSvc
This is mostly here for unit test purposes. Regular code is not expected to call this method directly.- Specified by:
start
in interfaceIPartitionLookupSvc
-
getPartitionByName
- Specified by:
getPartitionByName
in interfaceIPartitionLookupSvc
-
getPartitionById
- Specified by:
getPartitionById
in interfaceIPartitionLookupSvc
-
invalidateCaches
- Specified by:
invalidateCaches
in interfaceIPartitionLookupSvc
-
generateRandomUnusedPartitionId
Generate a random postive integer between 1 and Integer.MAX_VALUE, which is guaranteed to be unused by an existing partition.- Specified by:
generateRandomUnusedPartitionId
in interfaceIPartitionLookupSvc
- Returns:
- an integer representing a partition ID that is not currently in use by the system.
-
createPartition
@Transactional public PartitionEntity createPartition(PartitionEntity thePartition, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) - Specified by:
createPartition
in interfaceIPartitionLookupSvc
-
updatePartition
- Specified by:
updatePartition
in interfaceIPartitionLookupSvc
-
deletePartition
- Specified by:
deletePartition
in interfaceIPartitionLookupSvc
-
listPartitions
- Specified by:
listPartitions
in interfaceIPartitionLookupSvc
-
executeInTransaction
-
validatePartitionIdSupplied
public static void validatePartitionIdSupplied(ca.uhn.fhir.context.FhirContext theFhirContext, Integer thePartitionId)
-