Hi,

It depends on what problem you want to solve and on what you want to do...
I suggest to ask the question again at StackOverflow. Even if you don't get
an answer there, most likely people will tell you what info is missing.

Regards,
Thomas



On Wednesday, March 18, 2015, ArunSDharan <a...@ecsfin.com> wrote:

> Hi Thomas,
>
> I really appreciate your valuable comments. I tried out the method using
> two maps yesterday and it works great.  I used a wrapper class and
> overridden the entryset. I was able to use it.
>
>  public Set entrySet() {
>         java.util.LinkedHashMap orderMap = new java.util.LinkedHashMap();
>         for (Object k : indexKeySet()) {
>          Object kyVal = indexMap.get(k);
>          orderMap.put(kyVal,  map.get(kyVal));
>         }
>         return orderMap.entrySet();
>     }
>
> Regarding the usage. I need to cache the value (Huge value) for a specific
> time until the one process is complete. I used LinkedHashMap at first but
> unfortunately it couldn't hold the big values.
> Am attaching the code here. Please have a look and let me know if any fine
> tuning has to be done
>
> Regards,
> Arun
>
> On Tuesday, March 17, 2015 at 10:35:57 PM UTC+5:30, Thomas Mueller wrote:
>>
>> Hi,
>>
>> This is not directly supported. You could write a wrapper for that, which
>> internally uses two maps. If your map is of type (K => V), then the first
>> map would be (K -> (V, counter)), and the second map would be (counter =>
>> K). That way, you can do efficient lookup by the counter and the key.
>>
>> But what is your use case? If it's for caching, then I suggest to have a
>> look at the LIRS cache instead.
>>
>> Regards,
>> Thomas
>>
>>
>> On Tue, Mar 17, 2015 at 7:18 AM, <a...@ecsfin.com> wrote:
>>
>>> Hi all,
>>>
>>> I am working on MVStore MVMap to create a custom map to handle huge
>>> data.  One thing i noticed when iterated through the map is that, its been
>>> sorted by key.  I would like to have a implementation similiar to the
>>> LinkedHashMap, which maintains the insertion order.  Is it possible to
>>> create a custom LinkedHashMap using the MVStore/MVMap? Can i get a sample
>>> java code to implement this?
>>>
>>> Appreciate your help.
>>>
>>> Thanks,
>>> Arun
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "H2 Database" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to h2-database+unsubscr...@googlegroups.com.
>>> To post to this group, send email to h2-database@googlegroups.com.
>>> Visit this group at http://groups.google.com/group/h2-database.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "H2 Database" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to h2-database+unsubscr...@googlegroups.com
> <javascript:_e(%7B%7D,'cvml','h2-database%2bunsubscr...@googlegroups.com');>
> .
> To post to this group, send email to h2-database@googlegroups.com
> <javascript:_e(%7B%7D,'cvml','h2-database@googlegroups.com');>.
> Visit this group at http://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to