These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: How to implement a prefetching strategy
PostPosted: Fri Feb 04, 2005 10:05 am 
Beginner
Beginner

Joined: Thu Feb 03, 2005 12:48 pm
Posts: 22
Hi,

I have the following model:
- a class Currency
- a class Date
- a class FXRate

There are about 50 Currency instances.
Each Currency object holds a large map, whose key is Date and value is FXRate.

When I access a fx rate I call currency.getFXRate(date)
At this point, I want to be able to control the prefetching strategy.

Strategy 1:
- All the fx rates for the same date are prefeteched and loaded in cache

Strategy 2:
- All the history for the last ~2 years for the given currency is prefetched in cache.

I want to be able to choose at runtime whether to use Strategy 1 or 2.

How to achieve this with Hibernate (2 or 3) ? Please give some examples.

This is a critical question for choosing Hibernate.

Thank you.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.