Kevin,

In case of entry processor, the value is copied. I.e., 'TestValue val' in
your code will be the copy of the value that actually stored in cache, so
you can safely update this instance. If Ignite will have to call the entry
processor once more for whatever reason, it will create a new copy which is
not updated yet. This is correct approach in a distributed system, because
otherwise it's very hard to properly support mutable objects (they are being
serialized/deserialized, there are backups, there is a shared persistent
store, transaction can be rolled back, but you can never rollback the change
in a Java object, etc...)

The same happens with the old value in interceptor (and actually everywhere
in the system). But new value behaves differently here, and probably you
were confused by this. I think we should make this behavior consistent.

Makes sense?

-Val



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/CacheStore-implementation-using-Hibernate-tp1423p1466.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Reply via email to