This content has been marked as final.
Show 2 replies
-
1. Re: Is any performance difference between Getting value directly from distributed Cache and event.getValue() when CacheEventListener fire?
william.burns Oct 9, 2018 2:19 PM (in response to jaga244)1 of 1 people found this helpfulIt depends, but if the listener is fired on the primary owner then there is no difference.
If however you are using clustered listeners or aren't using the primaryOnly setting on the listener then the first would be the most perfomant given that you don't have to serialize the value as a response a second time, for no owner nodes. However you have to be careful with modifying the cache inside a listener. As mentioned at Listener (Infinispan JavaDoc All 9.4.0.Final API) the event is notified while holding the lock to the entry and thus you can delay or possibly deadlock operations by doing so. You can set your listener to not be sync or use your own thread pool to avoid this issue if it is a problem.
-
2. Re: Is any performance difference between Getting value directly from distributed Cache and event.getValue() when CacheEventListener fire?
jaga244 Oct 9, 2018 2:37 PM (in response to william.burns)thanks for reply sir