Class EhcachePaginationStorage
- java.lang.Object
-
- org.openehealth.ipf.commons.ihe.hpd.controls.pagination.EhcachePaginationStorage
-
- All Implemented Interfaces:
PaginationStorage
public class EhcachePaginationStorage extends Object implements PaginationStorage
Ehcache-based pagination storage.- Since:
- 4.3
- Author:
- Dmytro Rud
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.openehealth.ipf.commons.ihe.hpd.controls.pagination.PaginationStorage
PaginationStorage.TakeResult
-
-
Constructor Summary
Constructors Constructor Description EhcachePaginationStorage(javax.cache.Cache<String,Object> cache, boolean needSerialization)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidstore(byte[] cookie, List<SearchResultEntry> entries)Stores an initial set of result entries.PaginationStorage.TakeResulttake(PagedResultsResponseControl pagination)Removes at most the given count of result entries from the storage and returns them together with a flag indicating whether some more entries remain in the storage.
-
-
-
Method Detail
-
store
public void store(byte[] cookie, List<SearchResultEntry> entries)Description copied from interface:PaginationStorageStores an initial set of result entries.- Specified by:
storein interfacePaginationStorage- Parameters:
cookie- cookie (key).entries- entries.
-
take
public PaginationStorage.TakeResult take(PagedResultsResponseControl pagination) throws Exception
Description copied from interface:PaginationStorageRemoves at most the given count of result entries from the storage and returns them together with a flag indicating whether some more entries remain in the storage. If the cookie is unknown, the list of result entries will be empty.- Specified by:
takein interfacePaginationStorage- Parameters:
pagination- an object containing the cookie (key) and the maximal count of result entries to return.- Returns:
- result entries and the remaining entries' availability flag.
- Throws:
Exception
-
-