Menu

#86 Let Name, Record, RRset and Zone implement Serializable

None
closed-accepted
nobody
None
5
2019-05-18
2008-10-28
No

Let the basic data structures Name, Record (and its subclasses), RRset and Zone implement Serializable to be able to serialize such objects e.g. for exchanging them by RMI.

Discussion

  • Patrick Speer

    Patrick Speer - 2008-10-28

    Unified diff against dnsjava-2.0.6

     
  • Brian Wellington

    Are these just random numbers, or were they generated somehow? This adds support for all the current subclasses of Record, but there's no documented procedure for adding support to new subclasses.

     
  • Patrick Speer

    Patrick Speer - 2009-09-16

    The serialVersionUID may be random. Those ones in the patch were generated by Eclipse IDE. They are required by the Serializable interface. Have a look at http://java.sun.com/javase/6/docs/api/java/io/Serializable.html

    New subclasses of Record will inherit the Serializable interface from Record and just have to define a serialVersionUID.

     
  • Brian Wellington

    OK. I'll apply this patch (later today), and update any classes added since the patch was generated.

    Is there a reason why Zone is included? Name and Record are pretty basic data structures, but Zone isn't.

     
  • Brian Wellington

    Committed.

     
  • Brian Wellington

    • status: open --> closed-accepted
     
  • Patrick Speer

    Patrick Speer - 2009-09-17

    Ok, basic was the wrong word here: all data structures which have to be exchanged through different Java VMs have to be serializable. In my scenario you can edit a Zone within a client and when you hit save it will be transfered to a server which supplies it to a nameserver. So zone has to be also serializable.

     
  • Brian Wellington

    Seems reasonable. It's all committed now, and there should be a release as soon as some other patches I'm expecting come in.

     
  • Patrick Speer

    Patrick Speer - 2009-09-18

    Great!

     
  • Ingo

    Ingo - 2019-05-18

    Ticket moved from /p/dnsjava/patches/14/