[infinispan-dev] Optional in listener events

Radim Vansa rvansa at redhat.com
Fri Aug 19 16:34:15 EDT 2016


Hi,

as I am trying to simplify current entry wrapping and distribution code, 
I often find that listeners can get wrong previous value in the event, 
and it sometimes forces the command to load the value even if it is not 
needed for the command.

I am wondering if we should change the previous value in events to 
Optional - we can usually at least detect that we cannot provide a 
reliable value (e.g. after retry due to topology change, or because the 
command did not bothered to load the previous value from cache loader) 
and return empty Optional.

WDYT?

Radim

-- 
Radim Vansa <rvansa at redhat.com>
JBoss Performance Team



More information about the infinispan-dev mailing list