Package ca.uhn.fhir.jpa.search
Class SearchCoordinatorSvcImpl
java.lang.Object
ca.uhn.fhir.jpa.search.SearchCoordinatorSvcImpl
- All Implemented Interfaces:
ca.uhn.fhir.jpa.api.svc.ISearchCoordinatorSvc
@Component("mySearchCoordinatorSvc")
public class SearchCoordinatorSvcImpl
extends Object
implements ca.uhn.fhir.jpa.api.svc.ISearchCoordinatorSvc
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass
class
A search task is a Callable task that runs in a thread pool to handle an individual search. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
List<ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId>
getResources
(String theUuid, int theFrom, int theTo, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) This method is called by the HTTP client processing thread in order to fetch resources.getSearchTotal
(String theUuid) static void
populateSearchEntity
(SearchParameterMap theParams, String theResourceType, String theSearchUuid, String theQueryString, Search theSearch, ca.uhn.fhir.interceptor.model.RequestPartitionId theRequestPartitionId) ca.uhn.fhir.rest.api.server.IBundleProvider
registerSearch
(ca.uhn.fhir.jpa.api.dao.IFhirResourceDao<?> theCallingDao, SearchParameterMap theParams, String theResourceType, ca.uhn.fhir.rest.api.CacheControlDirective theCacheControlDirective, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, ca.uhn.fhir.interceptor.model.RequestPartitionId theRequestPartitionId) void
setLoadingThrottleForUnitTests
(Integer theLoadingThrottleForUnitTests) void
setNeverUseLocalSearchForUnitTests
(boolean theNeverUseLocalSearchForUnitTests) void
setPersistedJpaBundleProviderFactoryForUnitTest
(PersistedJpaBundleProviderFactory thePersistedJpaBundleProviderFactory) void
setRequestPartitionHelperService
(ca.uhn.fhir.jpa.partition.IRequestPartitionHelperSvc theRequestPartitionHelperService) void
setSearchBuilderFactoryForUnitTest
(SearchBuilderFactory theSearchBuilderFactory) void
setSearchCacheServicesForUnitTest
(ISearchCacheSvc theSearchCacheSvc, ISearchResultCacheSvc theSearchResultCacheSvc) void
setSyncSizeForUnitTests
(int theSyncSize) void
start()
static org.springframework.data.domain.Pageable
toPage
(int theFromIndex, int theToIndex) Creates aPageable
using a start and end index
-
Field Details
-
DEFAULT_SYNC_SIZE
- See Also:
-
UNIT_TEST_CAPTURE_STACK
- See Also:
-
INTEGER_0
-
-
Constructor Details
-
SearchCoordinatorSvcImpl
Constructor
-
-
Method Details
-
setSearchCacheServicesForUnitTest
public void setSearchCacheServicesForUnitTest(ISearchCacheSvc theSearchCacheSvc, ISearchResultCacheSvc theSearchResultCacheSvc) -
start
-
cancelAllActiveSearches
- Specified by:
cancelAllActiveSearches
in interfaceca.uhn.fhir.jpa.api.svc.ISearchCoordinatorSvc
-
getResources
@Transactional(propagation=NEVER) public List<ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId> getResources(String theUuid, int theFrom, int theTo, @Nullable ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) This method is called by the HTTP client processing thread in order to fetch resources.- Specified by:
getResources
in interfaceca.uhn.fhir.jpa.api.svc.ISearchCoordinatorSvc
-
registerSearch
public ca.uhn.fhir.rest.api.server.IBundleProvider registerSearch(ca.uhn.fhir.jpa.api.dao.IFhirResourceDao<?> theCallingDao, SearchParameterMap theParams, String theResourceType, ca.uhn.fhir.rest.api.CacheControlDirective theCacheControlDirective, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, ca.uhn.fhir.interceptor.model.RequestPartitionId theRequestPartitionId) - Specified by:
registerSearch
in interfaceca.uhn.fhir.jpa.api.svc.ISearchCoordinatorSvc
-
getSearchTotal
- Specified by:
getSearchTotal
in interfaceca.uhn.fhir.jpa.api.svc.ISearchCoordinatorSvc
-
setLoadingThrottleForUnitTests
-
setNeverUseLocalSearchForUnitTests
-
setSyncSizeForUnitTests
-
setSearchBuilderFactoryForUnitTest
-
setPersistedJpaBundleProviderFactoryForUnitTest
public void setPersistedJpaBundleProviderFactoryForUnitTest(PersistedJpaBundleProviderFactory thePersistedJpaBundleProviderFactory) -
setRequestPartitionHelperService
public void setRequestPartitionHelperService(ca.uhn.fhir.jpa.partition.IRequestPartitionHelperSvc theRequestPartitionHelperService) -
populateSearchEntity
public static void populateSearchEntity(SearchParameterMap theParams, String theResourceType, String theSearchUuid, String theQueryString, Search theSearch, ca.uhn.fhir.interceptor.model.RequestPartitionId theRequestPartitionId) -
toPage
@Nullable public static org.springframework.data.domain.Pageable toPage(int theFromIndex, int theToIndex) Creates aPageable
using a start and end index
-