-
1. Re: What the better way to store Collection Type in Remote Cache?
rvansa Nov 22, 2016 4:13 AM (in response to h3nrique)1 of 1 people found this helpfulInfinispan 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
-
2. Re: What the better way to store Collection Type in Remote Cache?
h3nrique Dec 7, 2016 10:04 AM (in response to rvansa)Thanks Radim!
I redo my logic and replace HashSet to a List. The code below is was i store in cache.
Write
protoStreamWriter.writeArray("arrayObject", myObject.getObjectList().toArray(), ObjectList.class);
Read
ObjectList[] myList = protoStreamReader,readArray("arrayObject", ObjectList.class);
Ps: I will do some tests with Hibernate OGM.