Package ca.uhn.fhir.jpa.search.cache
Interface ISearchResultCacheSvc
- All Known Implementing Classes:
DatabaseSearchResultCacheSvcImpl
public interface ISearchResultCacheSvc
-
Method Summary
Modifier and TypeMethodDescriptionfetchAllResultPids
(Search theSearch, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, RequestPartitionId theRequestPartitionId) Fetch all result PIDs for a given search with no particular order requiredfetchResultPids
(Search theSearch, int theFrom, int theTo, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, RequestPartitionId theRequestPartitionId) Fetch a subset of the search result IDs from the cachevoid
storeResults
(Search theSearch, List<JpaPid> thePreviouslyStoredResourcePids, List<JpaPid> theNewResourcePids, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, RequestPartitionId theRequestPartitionId)
-
Method Details
-
storeResults
void storeResults(Search theSearch, List<JpaPid> thePreviouslyStoredResourcePids, List<JpaPid> theNewResourcePids, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, RequestPartitionId theRequestPartitionId) - Parameters:
theSearch
- The search - This method is not required to persist any chances to the Search object, it is only provided here for identificationthePreviouslyStoredResourcePids
- A list of resource PIDs that have previously been saved to this searchtheNewResourcePids
- A list of new resource PIDs to add to this search (these ones have not been previously saved)
-
fetchResultPids
@Nullable List<JpaPid> fetchResultPids(Search theSearch, int theFrom, int theTo, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, RequestPartitionId theRequestPartitionId) Fetch a subset of the search result IDs from the cache- Parameters:
theSearch
- The search to fetch IDs fortheFrom
- The starting index (inclusive)theTo
- The ending index (exclusive)- Returns:
- A list of resource PIDs, or
null
if the results no longer exist (this should only happen if the results have been removed from the cache for some reason, such as expiry or manual purge)
-
fetchAllResultPids
@Nullable List<JpaPid> fetchAllResultPids(Search theSearch, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, RequestPartitionId theRequestPartitionId) Fetch all result PIDs for a given search with no particular order required- Parameters:
theSearch
- The search object- Returns:
- A list of resource PIDs, or
null
if the results no longer exist (this should only happen if the results have been removed from the cache for some reason, such as expiry or manual purge)
-