@Override public void readObject(BufferInput buffer, Serializer serializer) { super.readObject(buffer, serializer); mode = PersistenceMode.values()[buffer.readByte()]; ttl = buffer.readLong(); }
@Override public void writeObject(BufferOutput buffer, Serializer serializer) { super.writeObject(buffer, serializer); buffer.writeByte(mode.ordinal()).writeLong(ttl); }