@Override public Time deserialize(DataInputView source) throws IOException { final long v = source.readLong(); if (v == Long.MIN_VALUE) { return null; } else { return new Time(v); } }
@Override public Date deserialize(DataInputView source) throws IOException { final long v = source.readLong(); if (v == Long.MIN_VALUE) { return null; } else { return new Date(v); } }
@Override public Date deserialize(Date reuse, DataInputView source) throws IOException { final long v = source.readLong(); if (v == Long.MIN_VALUE) { return null; } reuse.setTime(v); return reuse; }
@Override public Timestamp deserialize(DataInputView source) throws IOException { final long v = source.readLong(); if (v == Long.MIN_VALUE) { return null; } else { final Timestamp t = new Timestamp(v); t.setNanos(source.readInt()); return t; } }
@Override public void read(DataInputView in) throws IOException { // read 8 bytes in.readLong(); } }
@Override public Time deserialize(Time reuse, DataInputView source) throws IOException { final long v = source.readLong(); if (v == Long.MIN_VALUE) { return null; } reuse.setTime(v); return reuse; }
@Override public void copy(DataInputView source, DataOutputView target) throws IOException { target.writeLong(source.readLong()); }
@Override public void copy(DataInputView source, DataOutputView target) throws IOException { target.writeLong(source.readLong()); }
@Override public Timestamp deserialize(Timestamp reuse, DataInputView source) throws IOException { final long v = source.readLong(); if (v == Long.MIN_VALUE) { return null; } reuse.setTime(v); reuse.setNanos(source.readInt()); return reuse; }
@Override public void read(DataInputView in) throws IOException { position = in.readInt(); mark = 0; ensureCapacity(position); for (int i = 0; i < position; i++) { data[i] = in.readLong(); } }
@Override public void copy(DataInputView source, DataOutputView target) throws IOException { target.writeLong(source.readLong()); target.writeInt(source.readInt()); }
@Override public void read(DataInputView in) throws IOException { this.aInt = in.readInt(); this.aLong = in.readLong(); } }
@Override public void copy(DataInputView source, DataOutputView target) throws IOException { target.writeLong(source.readLong()); keySerializer.copy(source, target); namespaceSerializer.copy(source, target); }
@Override public void copy(DataInputView source, DataOutputView target) throws IOException { target.writeLong(source.readLong()); target.writeInt(source.readInt()); }
public static <V> ValueTimeWrapper<V> deserialize( final TypeSerializer<V> valueSerializer, final DataInputView source) throws IOException { final V value = valueSerializer.deserialize(source); final long timestamp = source.readLong(); final int counter = source.readInt(); return new ValueTimeWrapper<>(value, timestamp, counter); } }
@Override public void read(DataInputView in) throws IOException { this.magicNumber = in.readLong(); this.payload = new byte[in.readInt()]; in.readFully(this.payload); }
@Override public void copy( DataInputView source, DataOutputView target) throws IOException { boolean hasTransactionalId = source.readBoolean(); target.writeBoolean(hasTransactionalId); if (hasTransactionalId) { target.writeUTF(source.readUTF()); } target.writeLong(source.readLong()); target.writeShort(source.readShort()); }