
Package ca.uhn.fhir.jpa.partition
Class PartitionLookupSvcImpl
java.lang.Object
ca.uhn.fhir.jpa.partition.PartitionLookupSvcImpl
- All Implemented Interfaces:
IPartitionLookupSvc
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreatePartition(PartitionEntity thePartition, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) voiddeletePartition(Integer thePartitionId) protected <T> TexecuteInTransaction(ICallable<T> theCallable) intGenerate 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) voidvoidstart()This is mostly here for unit test purposes.updatePartition(PartitionEntity thePartition) static voidvalidatePartitionIdSupplied(ca.uhn.fhir.context.FhirContext theFhirContext, Integer thePartitionId)
-
Constructor Details
-
PartitionLookupSvcImpl
public PartitionLookupSvcImpl()Constructor
-
-
Method Details
-
start
Description copied from interface:IPartitionLookupSvcThis is mostly here for unit test purposes. Regular code is not expected to call this method directly.- Specified by:
startin interfaceIPartitionLookupSvc
-
getPartitionByName
- Specified by:
getPartitionByNamein interfaceIPartitionLookupSvc
-
getPartitionById
- Specified by:
getPartitionByIdin interfaceIPartitionLookupSvc
-
invalidateCaches
- Specified by:
invalidateCachesin 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:
generateRandomUnusedPartitionIdin 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:
createPartitionin interfaceIPartitionLookupSvc
-
updatePartition
- Specified by:
updatePartitionin interfaceIPartitionLookupSvc
-
deletePartition
- Specified by:
deletePartitionin interfaceIPartitionLookupSvc
-
listPartitions
- Specified by:
listPartitionsin interfaceIPartitionLookupSvc
-
executeInTransaction
-
validatePartitionIdSupplied
public static void validatePartitionIdSupplied(ca.uhn.fhir.context.FhirContext theFhirContext, Integer thePartitionId)
-