Serialize SortedList

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Serialize SortedList

Fabian Zeindl
Hi,
 is there any way to serialize a SortedList, so i won't have to do the sorting all the time? Since AbstractTableComparatorChooser is serializable…

Regards
Fabian Zeindl
Reply | Threaded
Open this post in threaded view
|

Re: Serialize SortedList

Rob Eden
Serializing lists is tricky because the locks become meaningless after serialization, which is the main reason (I believe) lists don't support it out of the box.

If you're wanting to sort, say, on the server-side, I'd recommend you:
1) (Server) Put into SortedList
2) (Server) Serialize the data in order from the list (note: not the list itself, just the data in order)
3) (Client) Put the data into a BasicEventList (since it's now in order)

When I serialize data, I tend to put it in the simplest form possible because it makes compatibility issues less problematic.

Rob

On Tue, Dec 20, 2011 at 10:48 AM, Fabian Zeindl <[hidden email]> wrote:
Hi,
 is there any way to serialize a SortedList, so i won't have to do the
sorting all the time? Since AbstractTableComparatorChooser is serializable…

Regards
Fabian Zeindl

--
View this message in context: http://glazedlists.1045722.n5.nabble.com/Serialize-SortedList-tp5089414p5089414.html
Sent from the GlazedLists - Dev mailing list archive at Nabble.com.