Class ImmutableListSerializer


  • public class ImmutableListSerializer
    extends com.esotericsoftware.kryo.Serializer<com.google.common.collect.ImmutableList<Object>>
    A kryo Serializer for guava-libraries ImmutableList.
    • Constructor Detail

      • ImmutableListSerializer

        public ImmutableListSerializer()
    • Method Detail

      • write

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

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

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