Class LiteSearchResultCacheEntry

  • All Implemented Interfaces:

    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
    See Also:
    Serialized Form
    • Constructor Detail

      • LiteSearchResultCacheEntry

        public LiteSearchResultCacheEntry()
      • LiteSearchResultCacheEntry

        public LiteSearchResultCacheEntry​(List<LiteLabelSearchResult> list,
                                          int requestedLimit,
                                          long expirationTs,
                                          long requestTs)
    • Method Detail

      • 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()