@Override
      public void write(MyState state, DataOutput out) throws IOException {
        out.writeLong(state.getTimestamp());
        final ValidityState extState = state.getExtState();
        if (extState != null) {
          extState.save(out);
        }
      }
@Override
      public void write(MyState state, DataOutput out)