Hazelcast 'IdentifiedDataSerializable': writeData HashMap instance

290 views Asked by At

I've started using Hazelcast's IdentifiedDataSerializable interface to serialize some classes and something is not working right when I need to writeData a simple java.util.map instance - I do it using

out.writeObject(map_inst);

but it throws an exception: java.io.NotSerializableException

If I store only a single entry of the map as follow:

out.writeObject(map_inst.get(0));

then it works!

What am I missing here?

Another question: in my class I have the following declaration:

private static final int FRACTION = 0.1;

Do I need to writeData\readData 'static final' members? or because they are static there is no need?

Thank you!

0

There are 0 answers