Class SpringCachePagingProvider
java.lang.Object
org.openehealth.ipf.commons.ihe.fhir.SpringCachePagingProvider
- All Implemented Interfaces:
IPagingProvider
Paging provider that uses a Spring cache abstraction to store
IBundleProvider
instances.
The PagingProvider is used whenever there are more results than the client has requested.
Note that IBundleProvider
is not serializable, so if isDistributed()
returns true,
only the bundles are stored. When the result list is retrieved
a new instance of SimpleBundleProvider
is created and returned instead. This does
not work with LazyBundleProvider
as this class relies on a completely initialized result list.
Eviction of paging results is done by appropriately configuring the fhirPagingCache cache
- Since:
- 3.2
- Author:
- Christian Ohr
-
Constructor Summary
ConstructorDescriptionSpringCachePagingProvider
(CacheManager cacheManager, FhirContext fhirContext) -
Method Summary
Modifier and TypeMethodDescriptionint
int
boolean
retrieveResultList
(RequestDetails requestDetails, String id) void
setDefaultPageSize
(int defaultPageSize) void
setDistributed
(boolean distributed) void
setMaximumPageSize
(int maximumPageSize) storeResultList
(RequestDetails requestDetails, IBundleProvider bundleProvider) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ca.uhn.fhir.rest.server.IPagingProvider
canStoreSearchResults, retrieveResultList
-
Constructor Details
-
SpringCachePagingProvider
-
-
Method Details
-
storeResultList
- Specified by:
storeResultList
in interfaceIPagingProvider
-
retrieveResultList
- Specified by:
retrieveResultList
in interfaceIPagingProvider
-
getDefaultPageSize
public int getDefaultPageSize()- Specified by:
getDefaultPageSize
in interfaceIPagingProvider
-
setDefaultPageSize
public void setDefaultPageSize(int defaultPageSize) -
getMaximumPageSize
public int getMaximumPageSize()- Specified by:
getMaximumPageSize
in interfaceIPagingProvider
-
setMaximumPageSize
public void setMaximumPageSize(int maximumPageSize) -
isDistributed
public boolean isDistributed() -
setDistributed
public void setDistributed(boolean distributed)
-