Examples of addDefaultSerializer()


Examples of com.esotericsoftware.kryo.Kryo.addDefaultSerializer()

        this.versionedHeader = out.toBytes();
    }

    public Kryo createKryo() {
        final Kryo kryo = new Kryo(new GremlinClassResolver(), new MapReferenceResolver(), new DefaultStreamFactory());
        kryo.addDefaultSerializer(Map.Entry.class, new EntrySerializer());
        kryo.setRegistrationRequired(true);
        serializationList.forEach(p -> {
            final Function<Kryo, Serializer> serializer = p.getValue1();
            if (serializer == null)
                kryo.register(p.getValue0(), kryo.getDefaultSerializer(p.getValue0()), p.getValue2());
View Full Code Here

Examples of com.esotericsoftware.kryo.Kryo.addDefaultSerializer()

        final Kryo kryo = new Kryo();
        @SuppressWarnings("unchecked")
    final SerializerFactory disregardingSerializerFactory = new FieldAnnotationAwareSerializer.Factory(
                Arrays.<Class<? extends Annotation>>asList(CustomMark.class), true);
        kryo.addDefaultSerializer(CustomBean.class, disregardingSerializerFactory);

        final byte[] buffer = makeBuffer();

        final CustomBean outputBean = makeBean();
        final Output output = new Output(buffer);
View Full Code Here

Examples of com.esotericsoftware.kryo.Kryo.addDefaultSerializer()

        final Kryo kryo = new Kryo();
        @SuppressWarnings("unchecked")
    final SerializerFactory regardingSerializerFactory = new FieldAnnotationAwareSerializer.Factory(
                Arrays.<Class<? extends Annotation>>asList(CustomMark.class), false);
        kryo.addDefaultSerializer(CustomBean.class, regardingSerializerFactory);

        final byte[] buffer = makeBuffer();

        final CustomBean outputBean = makeBean();
        final Output output = new Output(buffer);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.