1 of 1 people found this helpful
Infinispan offers AtomicMaps that perform better as these send only deltas of the operations, but regrettably this is not available over remote protocols. If you want to modify/select from big complex data in-place, you have to use stored scripts invoking functional calls. Regrettably it won't be possible to invoke functional calls over Hot Rod directly - Hot Rod is language agnostic (as well as the other remote protocols) and you can't just pass a lambda through.
However treating complex relationships of objects in Infinispan can be tricky. That's why Hibernate OGM has recently implemented support over Hot Rod protocol
I redo my logic and replace HashSet to a List. The code below is was i store in cache.
protoStreamWriter.writeArray("arrayObject", myObject.getObjectList().toArray(), ObjectList.class);
ObjectList myList = protoStreamReader,readArray("arrayObject", ObjectList.class);
Ps: I will do some tests with Hibernate OGM.