Class LiteSearchResultCacheEntry
java.lang.Object
com.atlassian.confluence.impl.labels.adaptivelabelcache.LiteSearchResultCacheEntry
- All Implemented Interfaces:
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:
-
Constructor Summary
ConstructorsConstructorDescriptionLiteSearchResultCacheEntry
(List<LiteLabelSearchResult> list, int requestedLimit, long expirationTs, long requestTs) -
Method Summary
Modifier and TypeMethodDescriptionlong
getList()
getList
(int limit) int
long
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 Details
-
LiteSearchResultCacheEntry
public LiteSearchResultCacheEntry() -
LiteSearchResultCacheEntry
public LiteSearchResultCacheEntry(List<LiteLabelSearchResult> list, int requestedLimit, long expirationTs, long requestTs)
-
-
Method Details
-
getList
-
getList
-
setList
-
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()
-