public Date copy (Kryo kryo, Date original) { return create(kryo, original.getClass(), original.getTime()); } }
public KryoConverter(Class<T> clazz) { this.clazz = clazz; this.kryo = new Kryo(); this.kryo.register(clazz); this.kryo.register(Date.class, new DateSerializer()); this.kryo.setDefaultSerializer(CompatibleFieldSerializer.class); this.kryo.setInstantiatorStrategy(new Kryo.DefaultInstantiatorStrategy(new StdInstantiatorStrategy())); // this.input = new Input(); this.output = new Output(new ByteArrayOutputStream()); }
kryo.register(ConcurrentHashMap.class, new MapSerializer()); kryo.register(Timestamp.class, new TimestampSerializer()); kryo.register(Date.class, new DateSerializer()); kryo.register(AtomicLong.class, new FieldSerializer<AtomicLong>(kryo, AtomicLong.class));
public Date read (Kryo kryo, Input input, Class<Date> type) { return create(kryo, type, input.readLong(true)); }
public Date read (Kryo kryo, Input input, Class<Date> type) { return create(kryo, type, input.readLong(true)); }
public Date copy (Kryo kryo, Date original) { return create(kryo, original.getClass(), original.getTime()); } }
public Date read (Kryo kryo, Input input, Class<Date> type) { return create(kryo, type, input.readLong(true)); }
public Date copy (Kryo kryo, Date original) { return create(kryo, original.getClass(), original.getTime()); } }