问题描述:

I need to know the working internal working of hazelcast. let's suppose the following scenario.

I have classes.

Class User{

// come Fileds

}

MainClass

Class MainClass{

public static void main(String[] args){

//lets assume, I have a map, that contains User.java objects in its value. Also I have implemented loadStore.

IMap<String, User> userMap = hazelcastClient.getMap("User");

User user = userMap.get("userid");

// i updated some fields in user object.

user.age(26);

userMap.put("userid", user);

}

}

I want to know, what will happen in store, when i put updated User-class object in map, against same key?

either hcast gonna write store whole object again in its store method or just the update? does hazelcast version the entries stored in it?

网友答案:

It always reads and writes (deserializes and serializes) the whole object. http://blog.hazelcast.com/2013/06/13/updated-comparing-hazelcast-3-serialization-methods-with-kryo-serialization-and-jackson-smile/

网友答案:

If use the in-memory-format as OBJECT then, there will be no cost deserialization and serialization. And if you are updating a field of an object then you can try using Entry processor. It will improve the performance.

相关阅读:
Top