info.jerrinot.subzero.example.HashMapSerializerExample Maven / Gradle / Ivy
package info.jerrinot.subzero.example;
import info.jerrinot.subzero.AbstractTypeSpecificUserSerializer;
import java.util.HashMap;
/**
* Example of a custom SubZero serializer for a specific type. It returns a constant
* {@link #getTypeId()} hence it does not rely on serializer configuration order.
*
* This is how you would use this serializer in Hazelcast configuration:
*
* {@code
*
*
*
*
*
* }
*
*/
public class HashMapSerializerExample extends AbstractTypeSpecificUserSerializer {
public HashMapSerializerExample() {
super(HashMap.class);
}
/**
* TypeId has to be a unique for each registered serializer.
*
* @return TypeId of the class serialized by this serializer
*/
@Override
public int getTypeId() {
return 10000;
}
}