thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Slee <ms...@fb.com>
Subject RE: Ordered Map in Thrift
Date Tue, 01 Feb 2011 03:09:17 GMT
This doesn't exist as a Thrift feature. You'll need to separately maintain a list to preserve
ordering using Thrift off-the-shelf.

Another route to take would be to use some of the annotations to tell Thrift what data-types
to use for the map type. If you provide container types that implement ordering, they can
be swapped out. I don't recall off the top of my head what the syntax is on these type annotations
or how deep the support is -- perhaps someone else can chime in there, or you might look through
the implementation.

-----Original Message-----
From: Dheeraj Goswami [mailto:dheerajgoswami@yahoo.com] 
Sent: Monday, January 31, 2011 6:19 PM
To: user@thrift.apache.org
Subject: Ordered Map in Thrift

Hi,I have the requirement to use Map but keep it ordered (Like LinkedHashMap in java). Is
there a way to define thrift IDL to generate the ordered map in Java and C++ languages?

thanks,

--dheeraj

Mime
View raw message