Andrey,

isCached() may return false if the entry was concurrently removed from the
heap (note that EvictableEntry covers only on-heap evictions since it is
passed to the instance of an EvictionPolicy). Any cache access of the entry
key (get or update) will bring the entry back on-heap.

--AG

2018-02-08 15:19 GMT+03:00 Andrey Kuznetsov <stku...@gmail.com>:

> Hi Igniters!
>
> I can't comprehend the meaning of the following note in javadoc for
> EvictableEntry.isCached() method.
>
> "If entry is not in cache (e.g. has been removed) {@code false} is
> returned. In this case all operations on this entry will cause creation of
> a new entry in cache."
>
> That is, if I call getKey() or getValue() on removed entry it will be
> resurrected in cache? This sounds too magically. Could someone explain the
> real message of the phrase, please?
>
> --
> Best regards,
>   Andrey Kuznetsov.
>

Reply via email to