Class ImmutableMapSerializer


  • public class ImmutableMapSerializer
    extends com.esotericsoftware.kryo.Serializer<com.google.common.collect.ImmutableMap<Object,​? extends Object>>
    A kryo Serializer for guava-libraries ImmutableMap.
    • Constructor Detail

      • ImmutableMapSerializer

        public ImmutableMapSerializer()
    • Method Detail

      • write

        public void write​(com.esotericsoftware.kryo.Kryo kryo,
                          com.esotericsoftware.kryo.io.Output output,
                          com.google.common.collect.ImmutableMap<Object,​? extends Object> immutableMap)
        Specified by:
        write in class com.esotericsoftware.kryo.Serializer<com.google.common.collect.ImmutableMap<Object,​? extends Object>>
      • read

        public com.google.common.collect.ImmutableMap<Object,​Object> read​(com.esotericsoftware.kryo.Kryo kryo,
                                                                                com.esotericsoftware.kryo.io.Input input,
                                                                                Class<? extends com.google.common.collect.ImmutableMap<Object,​? extends Object>> type)
        Specified by:
        read in class com.esotericsoftware.kryo.Serializer<com.google.common.collect.ImmutableMap<Object,​? extends Object>>
      • registerSerializers

        public static void registerSerializers​(com.esotericsoftware.kryo.Kryo kryo)
        Creates a new ImmutableMapSerializer and registers its serializer for the several ImmutableMap related classes.
        Parameters:
        kryo - the Kryo instance to set the serializer on