Class LiteSearchResultCacheEntry
- java.lang.Object
-
- com.atlassian.confluence.impl.labels.adaptivelabelcache.LiteSearchResultCacheEntry
-
- All Implemented Interfaces:
Serializable
public class LiteSearchResultCacheEntry extends Object implements Serializable
Replacement for SearchResultCacheEntry LiteSearchResultCacheEntry does not have links to Hibernate objects It occupies less memory in RAM and do not require detaching objects before serialising- Since:
- 7.7.0
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description LiteSearchResultCacheEntry()
LiteSearchResultCacheEntry(List<LiteLabelSearchResult> list, int requestedLimit, long expirationTs, long requestTs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getExpirationTs()
List<LiteLabelSearchResult>
getList()
List<LiteLabelSearchResult>
getList(int limit)
int
getRequestedLimit()
long
getRequestTs()
boolean
hasEnoughRecordsForTheNewLimit(int newLimit)
Returns true if the cached record has enough labels for the provided limit.void
setExpirationTs(long expirationTs)
void
setList(List<LiteLabelSearchResult> list)
void
setRequestedLimit(int requestedLimit)
-
-
-
Constructor Detail
-
LiteSearchResultCacheEntry
public LiteSearchResultCacheEntry()
-
LiteSearchResultCacheEntry
public LiteSearchResultCacheEntry(List<LiteLabelSearchResult> list, int requestedLimit, long expirationTs, long requestTs)
-
-
Method Detail
-
getList
public List<LiteLabelSearchResult> getList()
-
getList
public List<LiteLabelSearchResult> getList(int limit)
-
setList
public void setList(List<LiteLabelSearchResult> list)
-
getRequestedLimit
public int getRequestedLimit()
-
setRequestedLimit
public void setRequestedLimit(int requestedLimit)
-
getExpirationTs
public long getExpirationTs()
-
setExpirationTs
public void setExpirationTs(long expirationTs)
-
hasEnoughRecordsForTheNewLimit
public boolean hasEnoughRecordsForTheNewLimit(int newLimit)
Returns true if the cached record has enough labels for the provided limit. For example, if we need 10 labels for a space, and the existing cached data was requested before with the limit of 20, we can use this cached record. Or it it was requested with the limit of 5, but has only 2 labels, it means cache has all the existing labels so we have enough records as well.
-
getRequestTs
public long getRequestTs()
-
-