0

I will try posting on their google forums as well. I have used putTransient on map before without any issues - however, in all those cases, putTransient was being called on a map where the value was a single user defined object. I am now trying putTransient on a map where the value is a LinkedHashSet of user defined objects (serializable). The regular put works fine for this LinkedHashSet - the putTransient complains the this method is undefined for the map. I have copied the relevant line of code below:

//testSet is LinkedHashSet of user defined object (fields are String, Boolean and Integer)
Long ttl = new Long(0);
testMap.putTransient(test.TypeUUID, testSet, ttl, TimeUnit.SECONDS); 

Any suggestions to further troubleshoot/fix this would be welcome.
I have tried both 2.4 and 2.5 versions. Thanks

4

1 回答 1

0

pilot error - I should have declared the map as IMap and not Map. Thanks to Brian for commenting.

//should be
IMap<String, LinkedHashSet<UserDefinedObject>>

//and not 
Map<String, LinkedHashSet<UserDefinedObject>>
于 2013-02-07T18:01:51.313 回答