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:dheerajgosw...@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

Reply via email to