Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Hazelcast's DataSerializable has no use with Hibernate L2 cache, because stored objects in Hazalcast cluster are not your entity objects. Hibernate uses its own data (say, serialization) format in L2, converts your entities and their relations and collections to its own format and gives its own objects (implementing java.io.Serializable) to Hazelcast. Hazelcast serializes those using standard java serialization and distributes across cluster.</p> <p>If your classes have complex and deep object graph (intensive use of composed objects and 1xn or similar relations), this dual-serialization issue causes long delays.</p> <p>Hazelcast has nothing to do with Hibernate's lazy-loading. Hibernate already stores entities and their relations and collection mappings separately. So all those can be loaded from Hazelcast one-by-one. But in your use-case, if most of lazy-loadable relations are always loaded, then that will cause multiple remote Hazelcast calls instead of one. So you should think carefully where to use lazy-loading. </p> <p>Another trick is to use/enable Hazelcast near-cache, if your app mostly read-only. (Btw if it is not, then using L2 cache maybe not suitable for you.) That way you will save lots of remote calls and frequently needed data will be cached locally. Near cache supports all Hazelcast map properties such as TTL, eviction, max-size etc.</p> <p><a href="http://www.hazelcast.com/documentation.jsp#MapNearCache">Hazelcast Near-Cache documentation...</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload