Hi Val,

just curious about why onAfterRemove(Cache.Entry(K,V) entry)
entry.getValue() sometimes return null.  but I never put a null value into the cache.
I have to check it to avoid NullPointerException.

Thanks
Shawn

On 02/7/2017 09:07shawn.du<[email protected]> wrote:
Hi Val,

Thanks very much. CacheInterceptor is the best way.
Shawn

On 02/7/2017 08:09vkulichenko<[email protected]> wrote:
Hi Shawn,

Your approach sounds a bit dangerous. Store is called within an entry lock,
which means that if you do a distributed get there, you will likely get
thread starvation. This should not happen on stable topology, but if another
node fails or joins, you can get stuck.

I think you should use interceptor instead:
https://ignite.apache.org/releases/mobile/org/apache/ignite/cache/CacheInterceptor.html

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/persist-only-on-delete-tp10438p10461.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Reply via email to